array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'function.time-sleep-until.php', 1 => 'time_sleep_until', 2 => 'Make the script sleep until the specified time', ), 'up' => array ( 0 => 'ref.misc.php', 1 => 'Функції Misc.', ), 'prev' => array ( 0 => 'function.time-nanosleep.php', 1 => 'time_nanosleep', ), 'next' => array ( 0 => 'function.uniqid.php', 1 => 'uniqid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/misc/functions/time-sleep-until.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
time_sleep_until — Make the script sleep until the specified time
timestamp
The timestamp when the script should wake.
If the specified timestamp
is in the past, this
function will generate a E_WARNING
.
Приклад #1 A time_sleep_until() example
<?php
//returns false and generates a warning
var_dump(time_sleep_until(time()-1));
// may only work on faster computers, will sleep up to 0.2 seconds
var_dump(time_sleep_until(microtime(true)+0.2));
?>
Зауваження: All signals will be delivered after the script wakes up.