Lines Matching refs:ts
82 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
84 ts.tv_nsec += ns; in timespec_add()
85 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
86 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
87 ts.tv_sec++; in timespec_add()
89 return ts; in timespec_add()
223 struct timespec ts; in main() local
225 if (clock_gettime(CLOCK_TAI, &ts)) { in main()
248 struct timespec ts; in main() local
253 clock_gettime(CLOCK_REALTIME, &ts); in main()
256 next_leap = ts.tv_sec; in main()
317 ts.tv_sec = next_leap - 3; in main()
318 ts.tv_nsec = 0; in main()
321 while (clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL)) in main()
365 ts.tv_sec = 0; in main()
366 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
367 clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL); in main()