Use the correct clock source when computing timeouts.
MFC after: 1 week
This commit is contained in:
parent
e6018a6dfd
commit
6b0d4730f1
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user