Use the correct clock source when computing timeouts.

MFC after:	1 week
This commit is contained in:
hselasky 2012-06-11 19:20:59 +00:00
parent e6018a6dfd
commit 6b0d4730f1

View File

@ -168,7 +168,7 @@ cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout)
return (false);
}
error = clock_gettime(CLOCK_MONOTONIC, &ts);
error = clock_gettime(CLOCK_REALTIME, &ts);
PJDLOG_ASSERT(error == 0);
ts.tv_sec += timeout;
error = pthread_cond_timedwait(cv, lock, &ts);