Sleep Statement

The sleep() statement suspends the current process for a specified number of seconds. The process is removed from memory, persisted until the specified period elapses, and then continued.

Due to system performance considerations, this method cannot guarantee precision to the second.

The following example illustrates how to use a sleep statement:

# set up a variable to use in the expression

$timeout = 300

# wait for 5 mins then continue.

sleep($timeout)

Flow Control