util: add UTI_IsZeroTimespec()

This commit is contained in:
Miroslav Lichvar
2016-09-16 10:01:37 +02:00
parent 45f86122fa
commit c8373f1649
4 changed files with 14 additions and 3 deletions

8
util.c
View File

@@ -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)
{