mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
util: add UTI_IsZeroTimespec()
This commit is contained in:
8
util.c
8
util.c
@@ -47,6 +47,14 @@ UTI_ZeroTimespec(struct timespec *ts)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
UTI_IsZeroTimespec(struct timespec *ts)
|
||||
{
|
||||
return !ts->tv_sec && !ts->tv_nsec;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
void
|
||||
UTI_TimevalToTimespec(struct timeval *tv, struct timespec *ts)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user