blob: 57889f9787258c244be955d31eb0a73feb99ea34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef TIMER_H
#define TIMER_H
#include "util/list.h"
typedef struct timer
{
void (*function)(uint64_t data);
uint64_t data;
uint64_t expires;
list_link_t link;
} timer_t;
void timer_init(timer_t *timer);
void timer_add(timer_t *timer);
int timer_del(timer_t *timer);
int timer_mod(timer_t *timer, int expires);
int timer_pending(timer_t *timer);
int timer_del_sync(timer_t *timer);
void __timers_fire();
#endif
|