X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=timer.h;fp=timer.h;h=fcbddc0ac3f341f4a584a41d7cbfc00a50e8933c;hb=5cb5a6ffc33667c93e9bc3572534dcaa684046e3;hp=0000000000000000000000000000000000000000;hpb=cd2dbd7df9f1b8c46386b2898523aec3dd4578fd;p=elogind.git 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