]>
Commit | Line | Data |
---|---|---|
26e8964b KZ |
1 | #ifndef UTIL_LINUX_TIMER_H |
2 | #define UTIL_LINUX_TIMER_H | |
3 | ||
4 | #include <signal.h> | |
5 | #include <sys/time.h> | |
6 | ||
6df5acf9 KZ |
7 | #ifdef HAVE_TIMER_CREATE |
8 | struct ul_timer { | |
9 | timer_t t_id; | |
10 | }; | |
11 | #else | |
12 | struct ul_timer { | |
13 | struct itimerval old_timer; | |
14 | struct sigaction old_sa; | |
15 | }; | |
16 | #endif | |
17 | ||
18 | extern int setup_timer(struct ul_timer *timer, struct itimerval *timeout, | |
26e8964b | 19 | void (*timeout_handler)(int, siginfo_t *, void *)); |
6df5acf9 | 20 | extern void cancel_timer(struct ul_timer *timer); |
26e8964b KZ |
21 | |
22 | #endif /* UTIL_LINUX_TIMER_H */ |