summaryrefslogtreecommitdiff
path: root/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'timer.h')
-rw-r--r--timer.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/timer.h b/timer.h
new file mode 100644
index 000000000..fcbddc0ac
--- /dev/null
+++ b/timer.h
@@ -0,0 +1,30 @@
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+#ifndef footimerhfoo
+#define footimerhfoo
+
+typedef struct Timer Timer;
+
+#include "name.h"
+
+typedef enum TimerState {
+ TIMER_DEAD,
+ TIMER_WAITING,
+ TIMER_RUNNING,
+ _TIMER_STATE_MAX
+} TimerState;
+
+struct Timer {
+ Meta meta;
+
+ TimerState state;
+
+ clockid_t clock_id;
+ usec_t next_elapse;
+
+ Service *service;
+};
+
+const NameVTable timer_vtable;
+
+#endif