usleep
Delay execution with specified number of microseconds
The usleep()
function delays the execution of the current script by the specified number of microseconds (one microsecond is equal to one millionth of a second).
Delay the current script execution by 3 seconds (30000000 microseconds):
<?php echo date ( 'h:i:s' ) . "<br>" ; // Pause for 3 seconds usleep ( 3000000 ) ; // Start again echo date ( 'h:i:s' ) ; ?>
Try it yourself
usleep ( microseconds )
parameter | describe |
---|---|
microseconds | Required. Specifies the number of microseconds for the delay script. |
No return value.