Lines Matching refs:tv
88 #define timespec_to_double(tv) \ argument
89 ((double)(tv)->tv_sec + (double)((tv)->tv_nsec) / 1000000000.0)
90 #define timespecnorm(tv) do { \ argument
91 while ((tv)->tv_nsec >= NSEC_PER_SEC) { \
92 (tv)->tv_sec++; \
93 (tv)->tv_nsec -= NSEC_PER_SEC; \
96 #define ts_to_ms(ms, tv) do { \ argument
97 ms = (tv)->tv_sec * MSEC_PER_SEC; \
98 ms += (tv)->tv_nsec / MSEC_PER_NSEC; \
100 #define ms_to_ts(tv, ms) do { \ argument
101 (tv)->tv_sec = ms / MSEC_PER_SEC; \
102 (tv)->tv_nsec = (suseconds_t)(ms - ((tv)->tv_sec * MSEC_PER_SEC)) \
107 #define TIMEVAL_TO_TIMESPEC(tv, ts) do { \ argument
108 (ts)->tv_sec = (tv)->tv_sec; \
109 (ts)->tv_nsec = (tv)->tv_usec * USEC_PER_NSEC; \