Lines Matching refs:ts
78 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
80 ts.tv_nsec += ns; in timespec_add()
81 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
82 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
83 ts.tv_sec++; in timespec_add()
85 return ts; in timespec_add()
183 struct timespec ts; in main() local
185 if (clock_gettime(CLOCK_TAI, &ts)) { in main()
202 struct timespec ts; in main() local
207 clock_gettime(CLOCK_REALTIME, &ts); in main()
210 next_leap = ts.tv_sec; in main()
255 ts.tv_sec = next_leap - 3; in main()
256 ts.tv_nsec = 0; in main()
258 while (clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL)) in main()
301 ts.tv_sec = 0; in main()
302 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
303 clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL); in main()