Lines Matching defs:time
7 #include <time.h>
36 // For clock IDs we can't otherwise verify, try to get the time.
55 clock_gettime(clockid_t clockID, struct timespec* time)
57 // get the time in microseconds
78 time->tv_sec = microSeconds / 1000000;
79 time->tv_nsec = (microSeconds % 1000000) * 1000;
86 clock_settime(clockid_t clockID, const struct timespec* time)
93 if (time->tv_sec < 0 || time->tv_nsec < 0 || time->tv_nsec >= 1000000000)
97 bigtime_t microSeconds = (bigtime_t)time->tv_sec * 1000000
98 + time->tv_nsec / 1000;
105 clock_nanosleep(clockid_t clockID, int flags, const struct timespec* time,
108 // convert time to microseconds (round up)
109 if (time->tv_sec < 0 || time->tv_nsec < 0 || time->tv_nsec >= 1000000000)
112 bigtime_t microSeconds = (bigtime_t)time->tv_sec * 1000000
113 + (time->tv_nsec + 999) / 1000;
131 // remaining wait time.
137 // We were slow enough that the wait time passed anyway.
159 // test-get the time to verify the team exists and we have permission