time_nanosleep 


php apg

DELAYS the program executions by a given number of  seconds  plus  nseconds .



<?php

arr
|bool time_nanosleep int $seconds int $nanoseconds )


where,

$seconds Number of seconds to delay

$nanoseconds 
Number of nanoseconds to add to seconds

?>

 $seconds 


Number of  seconds , (seconds), to delay the program execution.



 $nanoseconds 


Number of  nseconds , (nanoseconds), to add to seconds to delay the program execution.





Since PHP 5.3.0  - this function is available on Windows.

On Windows, the system may sleep longer that the given number of nanoseconds, depending on the hardware.

$seconds must be a non-negative integer.

$nanoseconds must be a non-negative integer less than 1 billion.

This function returns TRUE on success or FALSE on failure.



  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>';

echo 
date("l F d Y H:i:s");
echo 
'<br><br>';

$t1sec 2;
// seconds

$t1usec 100000000;
// nseconds

time_nanosleep($t1sec$t1usec);

echo 
date("l F d Y H:i:s");

?>