summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-21 16:24:03 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-01-27 18:31:59 +0100
commitd530add2eff7a1ee2bf3dd596f3ca10341bb470e (patch)
tree160f1d0a9f3fb669fbdd39f5a31ff09a94545772 /doc/usage
parentd485d1237b1d503753f039893179753817708553 (diff)
doc: sleep man-page
Provide a man-page for the sleep command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/sleep.rst45
-rw-r--r--doc/usage/index.rst1
2 files changed, 46 insertions, 0 deletions
diff --git a/doc/usage/cmd/sleep.rst b/doc/usage/cmd/sleep.rst
new file mode 100644
index 0000000000..d19e5b3af8
--- /dev/null
+++ b/doc/usage/cmd/sleep.rst
@@ -0,0 +1,45 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright 2023, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
+
+sleep command
+=============
+
+Synopsis
+--------
+
+::
+
+ sleep <delay>
+
+Description
+-----------
+
+The *sleep* command waits for *delay* seconds. It can be interrupted by
+CTRL+C.
+
+delay
+ delay in seconds. The value is decimal and can be fractional.
+
+Example
+-------
+
+The current data and time is display before and after sleeping for 3.2
+seconds:
+
+::
+
+ => date; sleep 3.2; date
+ Date: 2023-01-21 (Saturday) Time: 16:02:41
+ Date: 2023-01-21 (Saturday) Time: 16:02:44
+ =>
+
+Configuration
+-------------
+
+The command is only available if CONFIG_CMD_SLEEP=y.
+
+Return value
+------------
+
+The return value $? is 0 (true) if the command completes.
+The return value is 1 (false) if the command is interrupted by CTRL+C.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 7d4a1cbc10..72c15ca17a 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -76,6 +76,7 @@ Shell commands
cmd/scp03
cmd/setexpr
cmd/size
+ cmd/sleep
cmd/sound
cmd/source
cmd/temperature