Lines Matching refs:ts
131 struct timespec ts;
132 ts.tv_sec = abs_timeout / (1000*1000*1000);
133 ts.tv_nsec = abs_timeout % (1000*1000*1000);
142 int r = futex_wait(&fence->val, 2, timeout ? &ts : NULL);
199 struct timespec ts;
202 timespec_get(&ts, TIME_UTC);
204 clock_gettime(CLOCK_REALTIME, &ts);
207 ts.tv_sec += abs_timeout / (1000*1000*1000);
208 ts.tv_nsec += abs_timeout % (1000*1000*1000);
209 if (ts.tv_nsec >= (1000*1000*1000)) {
210 ts.tv_sec++;
211 ts.tv_nsec -= (1000*1000*1000);
216 if (cnd_timedwait(&fence->cond, &fence->mutex, &ts) != thrd_success)