Home | History | Annotate | Download | only in utility

Lines Matching defs:time

22 #include <time.h>
26 // Time conversion constants.
35 struct timespec time;
36 int result = clock_gettime(clockId, &time);
40 return (time.tv_sec * AAUDIO_NANOS_PER_SECOND) + time.tv_nsec;
44 * Sleep until the specified absolute time.
48 * @param nanoTime time to wake up
55 struct timespec time;
56 time.tv_sec = nanoTime / AAUDIO_NANOS_PER_SECOND;
58 time.tv_nsec = nanoTime - (time.tv_sec * AAUDIO_NANOS_PER_SECOND);
59 int err = clock_nanosleep(clockId, TIMER_ABSTIME, &time, nullptr);
75 * Sleep for the specified number of relative nanoseconds in real-time.
78 * @param nanoseconds time to sleep
84 struct timespec time;
85 time.tv_sec = nanoseconds / AAUDIO_NANOS_PER_SECOND;
87 time.tv_nsec = nanoseconds - (time.tv_sec * AAUDIO_NANOS_PER_SECOND);
89 int err = clock_nanosleep(clockId, flags, &time, nullptr);