Lines Matching refs:ts
71 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
73 ts.tv_nsec += ns; in timespec_add()
74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
76 ts.tv_sec++; in timespec_add()
78 return ts; in timespec_add()
213 struct timespec ts; in main() local
215 if (clock_gettime(CLOCK_TAI, &ts)) { in main()
238 struct timespec ts; in main() local
243 clock_gettime(CLOCK_REALTIME, &ts); in main()
246 next_leap = ts.tv_sec; in main()
307 ts.tv_sec = next_leap - 3; in main()
308 ts.tv_nsec = 0; in main()
311 while (clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL)) in main()
355 ts.tv_sec = 0; in main()
356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
357 clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL); in main()