[Chapter 3] 3.2.150 sleep
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:54:11Z

#

| Chapter 3 Functions |

### 3.2.150 sleep

    sleep EXPR
    sleep

This function causes the script to sleep for `EXPR` seconds, or forever if no `EXPR`. It may be interrupted by sending the process a `SIGALRM`. The function returns the number of seconds actually slept. On some systems, the function sleeps till the "top of the second," so, for instance, a `sleep 1` may sleep anywhere from 0 to 1 second, depending on when in the current second you started sleeping. A `sleep 2` may sleep anywhere from 1 to 2 seconds. And so on. If available, the select (ready file descriptors) call can give you better resolution. You may also be able to use syscall to call the getitimer(2) and setitimer(2) routines that some UNIX systems support.

3.2.149 sin |  | 3.2.151 socket