]>
Commit | Line | Data |
---|---|---|
5cb5a6ff LP |
1 | /*-*- Mode: C; c-basic-offset: 8 -*-*/ |
2 | ||
3 | #ifndef footimerhfoo | |
4 | #define footimerhfoo | |
5 | ||
6 | typedef struct Timer Timer; | |
7 | ||
87f0e418 | 8 | #include "unit.h" |
5cb5a6ff LP |
9 | |
10 | typedef enum TimerState { | |
11 | TIMER_DEAD, | |
12 | TIMER_WAITING, | |
13 | TIMER_RUNNING, | |
14 | _TIMER_STATE_MAX | |
15 | } TimerState; | |
16 | ||
17 | struct Timer { | |
18 | Meta meta; | |
19 | ||
20 | TimerState state; | |
21 | ||
22 | clockid_t clock_id; | |
23 | usec_t next_elapse; | |
24 | ||
25 | Service *service; | |
26 | }; | |
27 | ||
87f0e418 | 28 | const UnitVTable timer_vtable; |
5cb5a6ff LP |
29 | |
30 | #endif |