Latest web development tutorials

PHP time_sleep_until () function

PHP Misc Reference Manual 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

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

Note: If the number is negative, the function throws an error.


grammar

time_sleep_until( timestamp )

参数 描述
timestamp 必需。规定唤醒的时间。

technical details

return value: If successful it returns TRUE, on failure returns FALSE.
PHP version: 5.1.0+
Update log: Until PHP 5.3.0 version, this function was implemented in the Windows platform.


PHP Misc Reference Manual PHP Misc Reference Manual