| 1 | .TH SLEEP 3 |
| 2 | .SH NAME |
| 3 | sleep \- suspend execution for interval |
| 4 | .SH SYNOPSIS |
| 5 | .B sleep(seconds) |
| 6 | .br |
| 7 | .B unsigned seconds; |
| 8 | .SH DESCRIPTION |
| 9 | The current process is suspended from execution for the number |
| 10 | of seconds specified by the argument. |
| 11 | The actual suspension time may be up to 1 second less than |
| 12 | that requested, because scheduled wakeups occur at fixed 1-second intervals, |
| 13 | and an arbitrary amount longer because of other activity |
| 14 | in the system. |
| 15 | .PP |
| 16 | The routine is implemented by setting an alarm clock signal |
| 17 | and pausing until it occurs. |
| 18 | The previous state of this signal is saved and restored. |
| 19 | If the sleep time exceeds the time to the alarm signal, |
| 20 | the process sleeps only until the signal would have occurred, and the |
| 21 | signal is sent 1 second later. |
| 22 | .SH "SEE ALSO" |
| 23 | alarm(2), pause(2) |