]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/timer.h
script: report also timing file, do it only once
[thirdparty/util-linux.git] / include / timer.h
1 #ifndef UTIL_LINUX_TIMER_H
2 #define UTIL_LINUX_TIMER_H
3
4 #include <signal.h>
5 #include <sys/time.h>
6
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,
19 void (*timeout_handler)(int, siginfo_t *, void *));
20 extern void cancel_timer(struct ul_timer *timer);
21
22 #endif /* UTIL_LINUX_TIMER_H */