1
0
Fork 0

cEvent: Changed chrono duration resolution.

This commit is contained in:
Mattes D 2014-11-04 15:56:27 +01:00
parent 0d15261601
commit 5dbf601824
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ void cEvent::Wait(void)
bool cEvent::Wait(int a_TimeoutMSec)
{
std::chrono::system_clock::time_point dst = std::chrono::system_clock::now() + std::chrono::milliseconds(a_TimeoutMSec);
std::chrono::system_clock::time_point dst = std::chrono::system_clock::now() + std::chrono::microseconds(a_TimeoutMSec * 1000);
std::unique_lock<std::mutex> Lock(m_Mutex); // We assume that this lock is acquired without much delay - we are the only user of the mutex
while (m_ShouldWait && (std::chrono::system_clock::now() < dst))
{