mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Fixed semaphore timeout on Linux. Thanks @jsimmons for bug report.
This commit is contained in:
@@ -52,8 +52,9 @@ namespace bx
|
||||
}
|
||||
|
||||
timespec ts;
|
||||
ts.tv_sec = _msecs/1000;
|
||||
ts.tv_nsec = (_msecs%1000)*1000;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
ts.tv_sec += _msecs/1000;
|
||||
ts.tv_nsec += (_msecs%1000)*1000;
|
||||
return 0 == sem_timedwait(&m_handle, &ts);
|
||||
#endif // BX_PLATFORM_
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user