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