summaryrefslogtreecommitdiff
path: root/lib/common.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2018-02-24 17:29:07 +0100
committerhorchi <vdr@jwendel.de>2018-02-24 18:34:40 +0100
commitfb6de12636c538ab4ddaae0cc32089eac9584ed9 (patch)
tree6d769d1f32770fa90323028b4609c490a9a1cb86 /lib/common.h
parent49e5a4dd952d1fe444d40f107d5300132cef5eeb (diff)
downloadvdr-plugin-epg2vdr-fb6de12636c538ab4ddaae0cc32089eac9584ed9.tar.gz
vdr-plugin-epg2vdr-fb6de12636c538ab4ddaae0cc32089eac9584ed9.tar.bz2
2018-02-23 version 1.1.89 (horchi)\n - change: Improved switch timer 'timing'\n\n
Diffstat (limited to 'lib/common.h')
-rw-r--r--lib/common.h28
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
//***************************************************************************