1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
6 static void timer_done(Unit
*u
) {
12 static UnitActiveState
timer_active_state(Unit
*u
) {
14 static const UnitActiveState table
[_TIMER_STATE_MAX
] = {
15 [TIMER_DEAD
] = UNIT_INACTIVE
,
16 [TIMER_WAITING
] = UNIT_ACTIVE
,
17 [TIMER_RUNNING
] = UNIT_ACTIVE
20 return table
[TIMER(u
)->state
];
23 const UnitVTable timer_vtable
= {
26 .init
= unit_load_fragment_and_dropin
,
29 .active_state
= timer_active_state