]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: add example to demonstrate sub-second sleep times
authorBernhard Voelker <mail@bernhard-voelker.de>
Sun, 8 Dec 2019 16:29:57 +0000 (17:29 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sun, 8 Dec 2019 16:44:37 +0000 (17:44 +0100)
* doc/coreutils.texi (sleep invocation): Add an example to demonstrate
how to use the floating-point and the scientific notation to sleep
for sub-second times, e.g. milli-, micro- and nanoseconds.

Inspired by Stephane Chazelas in:
  https://lists.gnu.org/r/coreutils/2019-12/msg00005.html

doc/coreutils.texi

index 32ddba5974d26292b65ca69ca7babd845b2b9782..c52bb2dade43dc5b97b50410c241d98fb9d805e3 100644 (file)
@@ -18248,6 +18248,13 @@ non-negative integer argument without a suffix, GNU @command{sleep}
 also accepts two or more arguments, unit suffixes, and floating-point
 numbers in either the current or the C locale.  @xref{Floating point}.
 
+For instance, the following could be used to @command{sleep} for
+1 second, 234 milli-, 567 micro- and 890 nanoseconds:
+
+@example
+sleep 1234e-3 567.89e-6
+@end example
+
 The only options are @option{--help} and @option{--version}.  @xref{Common
 options}.