time_sleep_until
Make the script sleep until the specified time
The time_sleep_until()
function is used to sleep the script for a specified time.
Note: All signals will be delayed until after the script wakes up.
Let the script sleep for 3 seconds:
<?php // Wake up after 3 seconds from now time_sleep_until ( time ( ) + 3 ) ; echo "Hello" ; ?>
Try it yourself
time_sleep_until ( timestamp )
parameter | describe |
---|---|
timestamp | Required. Specifies the timestamp of when the script should wake up. |
Makes the script pause execution until the specified timestamp .
If successful, return TRUE, and if failed, return FALSE.
If the specified timestamp is in the past, the function will generate an E_WARNING.