From 259cf9f027adb41925e075799c7e46ccbcaec881 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 14 Aug 2013 22:27:49 +0200 Subject: cEvent can now wait for the event with a specified timeout. --- source/OSSupport/Event.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/OSSupport/Event.h') diff --git a/source/OSSupport/Event.h b/source/OSSupport/Event.h index 71f418c0c..803d73b7e 100644 --- a/source/OSSupport/Event.h +++ b/source/OSSupport/Event.h @@ -19,12 +19,22 @@ class cEvent { public: + enum eWaitResult + { + wrSignalled, + wrTimeout, + wrError, + } ; + cEvent(void); ~cEvent(); void Wait(void); void Set (void); + /// Waits for the semaphore with a timeout + eWaitResult Wait(int a_TimeoutMilliSec); + private: #ifdef _WIN32 -- cgit v1.2.3