25 #ifndef TIMEUTILS_MISC_H_INCLUDED
26 #define TIMEUTILS_MISC_H_INCLUDED
30 #if ! defined(NSEC_PER_SEC)
31 # define NSEC_PER_SEC 1000000000L
32 # define USEC_PER_SEC 1000000L
33 # define MSEC_PER_SEC 1000L
37 #define MSEC_TO_NSEC(msec) ((gint64)(msec) * NSEC_PER_SEC / MSEC_PER_SEC)
38 #define MSEC_TO_USEC(msec) ((gint64)(msec) * USEC_PER_SEC / MSEC_PER_SEC)
40 #define USEC_TO_NSEC(usec) ((gint64)(usec) * NSEC_PER_SEC / USEC_PER_SEC)
41 #define USEC_TO_USEC(usec) ((gint64)(usec) * USEC_PER_SEC / USEC_PER_SEC)
void timespec_add_usec(struct timespec *ts, gint64 usec)
Definition: misc.c:88
gint64 timespec_diff_nsec(struct timespec *t1, struct timespec *t2)
Definition: misc.c:118
glong timespec_diff_msec(const struct timespec *t1, const struct timespec *t2)
Definition: misc.c:106
void timespec_add_msec(struct timespec *ts, glong msec)
Definition: misc.c:70
gint64 timespec_diff_usec(const struct timespec *t1, const struct timespec *t2)
Definition: misc.c:112
gboolean check_nanosleep(void)
Definition: misc.c:42