From 5cb5a6ffc33667c93e9bc3572534dcaa684046e3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 23 Jan 2010 01:52:57 +0100 Subject: first attempt in implementinging execution logic --- timer.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 timer.h (limited to 'timer.h') diff --git a/timer.h b/timer.h new file mode 100644 index 0000000000..fcbddc0ac3 --- /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 -- cgit v1.2.3-54-g00ecf