Lines Matching refs:ts
549 static void absoluteTime(s8 msec, s4 nsec, struct timespec *ts) in absoluteTime() argument
554 clock_gettime(CLOCK_MONOTONIC, ts); in absoluteTime()
559 ts->tv_sec = tv.tv_sec; in absoluteTime()
560 ts->tv_nsec = tv.tv_usec * 1000; in absoluteTime()
563 endSec = ts->tv_sec + msec / 1000; in absoluteTime()
568 ts->tv_sec = endSec; in absoluteTime()
569 ts->tv_nsec = (ts->tv_nsec + (msec % 1000) * 1000000) + nsec; in absoluteTime()
572 if (ts->tv_nsec >= 1000000000L) { in absoluteTime()
573 ts->tv_sec++; in absoluteTime()
574 ts->tv_nsec -= 1000000000L; in absoluteTime()
582 struct timespec ts; in dvmRelativeCondWait() local
583 absoluteTime(msec, nsec, &ts); in dvmRelativeCondWait()
585 ret = pthread_cond_timedwait_monotonic(cond, mutex, &ts); in dvmRelativeCondWait()
587 ret = pthread_cond_timedwait(cond, mutex, &ts); in dvmRelativeCondWait()
619 struct timespec ts; in waitMonitor() local
648 absoluteTime(msec, nsec, &ts); in waitMonitor()
714 ret = pthread_cond_timedwait_monotonic(&self->waitCond, &self->waitMutex, &ts); in waitMonitor()
716 ret = pthread_cond_timedwait(&self->waitCond, &self->waitMutex, &ts); in waitMonitor()