From 53455a10fa30170917c46b8e6ee78934180dee79 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 19 Aug 2013 17:29:08 +0200 Subject: Fixed cEvent TimedWait on Linux. --- source/OSSupport/Event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/OSSupport/Event.cpp') diff --git a/source/OSSupport/Event.cpp b/source/OSSupport/Event.cpp index 9348384b0..32f780946 100644 --- a/source/OSSupport/Event.cpp +++ b/source/OSSupport/Event.cpp @@ -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) -- cgit v1.2.3