1
0

Fixed cEvent TimedWait on Linux.

This commit is contained in:
madmaxoft 2013-08-19 17:29:08 +02:00
parent 0575cc00b4
commit 53455a10fa

View File

@ -141,7 +141,7 @@ cEvent::eWaitResult cEvent::Wait(int a_TimeoutMilliSec)
}
#else
timespec timeout;
timeout.tv_sec = a_TimeoutMilliSec / 1000;
timeout.tv_sec = time(NULL) + a_TimeoutMilliSec / 1000;
timeout.tv_nsec = (a_TimeoutMilliSec % 1000) * 1000000;
int res = sem_timedwait(m_Event, &timeout);
if (res == 0)