diff options
author | Karel Zak | 2015-03-06 13:17:20 +0100 |
---|---|---|
committer | Karel Zak | 2015-03-06 13:17:20 +0100 |
commit | 26e8964b9db51e27cc6eaf5510ebc8eac8443f33 (patch) | |
tree | 1adb27c7542eca3eadea4e3457f7bbab24f1b39f /include/timer.h | |
parent | Merge branch 'logger-man-syslog-routine' of https://github.com/rgerhards/util... (diff) | |
download | kernel-qcow2-util-linux-26e8964b9db51e27cc6eaf5510ebc8eac8443f33.tar.gz kernel-qcow2-util-linux-26e8964b9db51e27cc6eaf5510ebc8eac8443f33.tar.xz kernel-qcow2-util-linux-26e8964b9db51e27cc6eaf5510ebc8eac8443f33.zip |
lib/timer: use separate file for timers
It seems that static builds require -lpthread for timer_* functions.
It's better to keep it out of our libs (e.g. libmount) to avoid
unnecessary dependence.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/timer.h')
-rw-r--r-- | include/timer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/timer.h b/include/timer.h new file mode 100644 index 000000000..aa9f9c018 --- /dev/null +++ b/include/timer.h @@ -0,0 +1,11 @@ +#ifndef UTIL_LINUX_TIMER_H +#define UTIL_LINUX_TIMER_H + +#include <signal.h> +#include <sys/time.h> + +extern int setup_timer(timer_t * t_id, struct itimerval *timeout, + void (*timeout_handler)(int, siginfo_t *, void *)); +extern void cancel_timer(timer_t * t_id); + +#endif /* UTIL_LINUX_TIMER_H */ |