summaryrefslogtreecommitdiffstats
path: root/include/timer.h
Commit message (Collapse)AuthorAgeFilesLines
* lib/timer: add fallback if timer_create() not availableKarel Zak2018-12-031-2/+13
| | | | | | | | | | | | | * add struct ul_timer as API abstraction to hide differences between timer_create() and setitimer() * add setitimer() detection to ./configure.ac * add fallback code to use setitimer() if timer_create() not available (for example on OSX) Addresses: https://github.com/karelzak/util-linux/issues/584 Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/timer: use separate file for timersKarel Zak2015-03-061-0/+11
| | | | | | | | 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>
* flock: improve timeout handlingSami Kerola2015-03-051-31/+0Star
| | | | | | | | | | | | Signal ALRM raised by the timer, and the timer only, will be considered as a timeout criteria. Secondly time interval is made to use monotonic clock. Documentation of ITIMER_REAL is unclear whether that time is affected various sources of clock skew, or does it even tick when system is suspended. Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include/timer: return setitimer return valueKarel Zak2013-03-131-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add timer.hKarel Zak2013-03-131-0/+31
Signed-off-by: Karel Zak <kzak@redhat.com>