time_sleep_until 


php apg

MAKES the script execution sleep until the specified  time .



<?php

bool time_sleep_until 
( float $timestamp )


where,

$timestamp = The timestamp when the script should wake

?>

 $timestamp 


The TIMESTAMP when the script should wake.





All signals will be delivered after the script wakes up.

Since PHP 5.3.0  - this function is available on Windows™.

This function returns TRUE on success or FALSE on failure.


THIS FUNCTION CAN CONSUME A LOT OF CPU RESOURCES



  1 EXERCISE   

<?php

$lang 
= 'en';

$str_tzg = date_default_timezone_get();

$pt = 'Fuso horário atual:<br>';
$en = 'Current Time Zone:<br>';
$jp = 'タイムゾーンセット:<br>';

echo 
'<br>' . $$lang  . '&nbsp;' . $str_tzg . '<br><br>';

$timei = microtime(time());
echo 
$timei . '<br>' . date("l F d Y H:i:s") . '<br><br>';

$tmsluntil = time_sleep_until($timei + 0.5);

$timem = microtime(time());
echo 
$timem . '<br>' . date("l F d Y H:i:s") . '<br><br>';

var_dump($tmsluntil);

?>