blob: d19e5b3af8727efd5b332e3285a76009ee216a3e [file] [log] [blame]
Heinrich Schuchardtd530add2023-01-21 16:24:03 +01001.. SPDX-License-Identifier: GPL-2.0+
2.. Copyright 2023, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3
4sleep command
5=============
6
7Synopsis
8--------
9
10::
11
12 sleep <delay>
13
14Description
15-----------
16
17The *sleep* command waits for *delay* seconds. It can be interrupted by
18CTRL+C.
19
20delay
21 delay in seconds. The value is decimal and can be fractional.
22
23Example
24-------
25
26The current data and time is display before and after sleeping for 3.2
27seconds:
28
29::
30
31 => date; sleep 3.2; date
32 Date: 2023-01-21 (Saturday) Time: 16:02:41
33 Date: 2023-01-21 (Saturday) Time: 16:02:44
34 =>
35
36Configuration
37-------------
38
39The command is only available if CONFIG_CMD_SLEEP=y.
40
41Return value
42------------
43
44The return value $? is 0 (true) if the command completes.
45The return value is 1 (false) if the command is interrupted by CTRL+C.