blob: a372e4da0e10ede974e0ce45d0b5648d746bd891 [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
Heinrich Schuchardt60971e62024-01-14 14:53:13 +01004.. index::
5 single: sleep (command)
6
Heinrich Schuchardtd530add2023-01-21 16:24:03 +01007sleep command
8=============
9
10Synopsis
11--------
12
13::
14
15 sleep <delay>
16
17Description
18-----------
19
20The *sleep* command waits for *delay* seconds. It can be interrupted by
21CTRL+C.
22
23delay
24 delay in seconds. The value is decimal and can be fractional.
25
26Example
27-------
28
29The current data and time is display before and after sleeping for 3.2
30seconds:
31
32::
33
34 => date; sleep 3.2; date
35 Date: 2023-01-21 (Saturday) Time: 16:02:41
36 Date: 2023-01-21 (Saturday) Time: 16:02:44
37 =>
38
39Configuration
40-------------
41
42The command is only available if CONFIG_CMD_SLEEP=y.
43
44Return value
45------------
46
47The return value $? is 0 (true) if the command completes.
48The return value is 1 (false) if the command is interrupted by CTRL+C.