PHP time_sleep_until()Function

PHP Misc 参考手册PHP Misc Reference Manual

Examples

Delay 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:If the specified number is negative, the function will throw an error.


Syntax

time_sleep_until(timestamp)

Parameter Description
timestamp Required. Specifies the time to wake up.

Technical Details

Return value: Returns TRUE on success, or FALSE on failure.
PHP Version: 5.1.0+
Changelog: This function was not implemented on the Windows platform until PHP 5.3.0.


PHP Misc 参考手册PHP Misc Reference Manual Other Extensions