Fix calculation of absolute timeout when using pthread_cond_timedwait.
This commit is contained in:
parent
30e38527a4
commit
bc7e0f38cf
@ -129,7 +129,7 @@ public:
|
||||
if (::clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
|
||||
{
|
||||
ts.tv_sec += usec / 1000000;
|
||||
ts.tv_nsec = (usec % 1000000) * 1000;
|
||||
ts.tv_nsec += (usec % 1000000) * 1000;
|
||||
ts.tv_sec += ts.tv_nsec / 1000000000;
|
||||
ts.tv_nsec = ts.tv_nsec % 1000000000;
|
||||
::pthread_cond_timedwait(&cond_,
|
||||
|
Loading…
Reference in New Issue
Block a user