summaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib/ctl-timer.h')
-rw-r--r--ctl-lib/ctl-timer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ctl-lib/ctl-timer.h b/ctl-lib/ctl-timer.h
index 6256dcc..333f172 100644
--- a/ctl-lib/ctl-timer.h
+++ b/ctl-lib/ctl-timer.h
@@ -23,7 +23,6 @@
// ctl-timer.c
// ----------------------
-typedef int (*timerCallbackT)(void *context);
typedef struct TimerHandleS {
int magic;
@@ -31,12 +30,14 @@ typedef struct TimerHandleS {
int delay;
const char*uid;
void *context;
- timerCallbackT callback;
sd_event_source *evtSource;
AFB_ApiT api;
- timerCallbackT freeCB;
+ int (*callback) (struct TimerHandleS *handle);
+ int (*freeCB) (void *context) ;
} TimerHandleT;
+typedef int (*timerCallbackT)(TimerHandleT *context);
+
PUBLIC int TimerEvtInit (AFB_ApiT apiHandle);
PUBLIC void TimerEvtStart(AFB_ApiT apiHandle, TimerHandleT *timerHandle, timerCallbackT callback, void *context);
PUBLIC void TimerEvtStop(TimerHandleT *timerHandle);