]> git.ipfire.org Git - thirdparty/util-linux.git/blame - include/timer.h
tests: improve unbuffer check
[thirdparty/util-linux.git] / include / timer.h
CommitLineData
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
8struct ul_timer {
9 timer_t t_id;
10};
11#else
12struct ul_timer {
13 struct itimerval old_timer;
14 struct sigaction old_sa;
15};
16#endif
17
18extern int setup_timer(struct ul_timer *timer, struct itimerval *timeout,
26e8964b 19 void (*timeout_handler)(int, siginfo_t *, void *));
6df5acf9 20extern void cancel_timer(struct ul_timer *timer);
26e8964b
KZ
21
22#endif /* UTIL_LINUX_TIMER_H */