1
0

cEvent: Changed steady_clock to system_clock.

This commit is contained in:
Mattes D 2014-11-04 15:47:55 +01:00
parent 6201b3602c
commit 0d15261601

View File

@ -37,9 +37,9 @@ void cEvent::Wait(void)
bool cEvent::Wait(int a_TimeoutMSec)
{
std::chrono::steady_clock::time_point dst = std::chrono::steady_clock::now() + std::chrono::milliseconds(a_TimeoutMSec);
std::chrono::system_clock::time_point dst = std::chrono::system_clock::now() + std::chrono::milliseconds(a_TimeoutMSec);
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::steady_clock::now() < dst))
while (m_ShouldWait && (std::chrono::system_clock::now() < dst))
{
switch (m_CondVar.wait_until(Lock, dst))
{