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