FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

PHP time_sleep_until() Function

PHP Misc Reference PHP Misc Reference

Example

Delay the execution of the current script until 10 seconds:

<?php
// wake up ten seconds from now
time_sleep_until(time()+10);
?>


Definition and Usage

The time_sleep_until() function delays execution of the current script until the specified time.

Note: This function throws an error if the specified number is negative.


Syntax

time_sleep_until(timestamp)

Parameter Description
timestamp Required. Specifies the time to wake

Technical Details

Return Value: Returns TRUE on success, or FALSE on failure
PHP Version: 5.1.0+
Changelog: This function did not work on Windows platforms until PHP 5.3.0

PHP Misc Reference PHP Misc Reference