36 namespace rp{
namespace hal{
49 Event(
bool isAutoReset =
true,
bool isSignal =
false)
58 _event = CreateEvent(NULL, isAutoReset?FALSE:TRUE, isSignal?TRUE:FALSE, NULL);
70 void set(
bool isSignal = true )
98 unsigned long wait(
unsigned long timeout = 0xFFFFFFFF )
101 switch (WaitForSingleObject(_event, timeout==0xFFFFFFF?INFINITE:(DWORD)timeout))
118 if (timeout == 0xFFFFFFFF){
124 gettimeofday(&now,NULL);
126 wait_time.tv_sec = timeout/1000 + now.tv_sec;
127 wait_time.tv_nsec = (timeout%1000)*1000000ULL + now.tv_usec*1000;
129 if (wait_time.tv_nsec >= 1000000000)
132 wait_time.tv_nsec -= 1000000000;
pthread_mutex_t _cond_locker
Event(bool isAutoReset=true, bool isSignal=false)
unsigned long wait(unsigned long timeout=0xFFFFFFFF)