diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-23 01:52:57 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-23 01:52:57 +0100 |
commit | 5cb5a6ffc33667c93e9bc3572534dcaa684046e3 (patch) | |
tree | 51e8b6260d56027c4d610ff6db5882737101a809 /timer.h | |
parent | cd2dbd7df9f1b8c46386b2898523aec3dd4578fd (diff) |
first attempt in implementinging execution logic
Diffstat (limited to 'timer.h')
-rw-r--r-- | timer.h | 30 |
1 files changed, 30 insertions, 0 deletions
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 |