PHP usleep() Function

Definition and Usage

The usleep() function delays the execution of the code for a few microseconds.

Syntax

usleep(microseconds)
Parameter Description
microseconds Required. Pause time in microseconds.

Return Value

No return value.

Tips and Comments

Comment:Before PHP 5, this function could not work on Windows systems.

Comment:One microsecond equals one millionth of a second.

Example

<?php
echo date('h:i:s') . "<br />";
//Delay 10 description
usleep(10000000);
//Again begin
echo date('h:i:s');
?>

Butu:

09:23:14
09:23:24