diff options
Diffstat (limited to 'lib/common.h')
-rw-r--r-- | lib/common.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/common.h b/lib/common.h index 28536ec..3d0aa95 100644 --- a/lib/common.h +++ b/lib/common.h @@ -414,6 +414,34 @@ class LogDuration }; //*************************************************************************** +// Timer Thread +//*************************************************************************** + +class cTimerThread : public cThread +{ + public: + + typedef void (*sendEventFct)(int event, void* userData); + + cTimerThread(sendEventFct fct, int aEvent, time_t aTime, void* aUserData = 0, bool aSelfDistroy = no); + + int isActive() { return active; } + + protected: + + virtual void Action(); + + int event; + time_t theTime; + void* userData; + bool selfdetroy; + cCondVar waitCondition; + int active; + + sendEventFct sendEvent; +}; + +//*************************************************************************** // Semaphore //*************************************************************************** |