timeout: support sub-second timeouts
commitaeb5222a6d7f7e9be5b737e2dbaf71185a9946db
authorPádraig Brady <P@draigBrady.com>
Mon, 18 Jul 2011 09:49:17 +0000 (18 10:49 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 25 Jul 2011 11:00:26 +0000 (25 12:00 +0100)
tree662bc2fd206d7ff948efa26f255a7eea819d6e6c
parent42c4ba6ceb638e3b624cbf03e0e0da44691f620c
timeout: support sub-second timeouts

* src/timeout.c (settimeout): A new function to convert
from a floating point duration and call alarm() or
timer_settime() if that's available.
(parse_duration): Return a double rather than unsigned int.
(usage): Mention floating point is supported.
(main): Pass the double to settimeout() rather than
calling alarm() directly with the parsed int.
(cleanup): Likewise.
* doc/coreutils.texi (timeout invocation): Say floating point timeouts
now supported, and mention the caveat with resolution.
* bootstrap.conf: Include the timer-time gnulib module.
* tests/misc/timeout-parameters: Add a test with nanoseconds.
* NEWS: Mention the improvement.
NEWS
bootstrap.conf
doc/coreutils.texi
src/Makefile.am
src/timeout.c
tests/misc/timeout-parameters