Documentation states that "seconds" must be positive. This is not correct, 0 is possible.
Rather, "seconds" must be non-negative.
time_nanosleep说明mixed time_nanosleep ( int seconds, int nanoseconds )Delays program execution for the given number of seconds and nanoseconds. seconds must be a positive integer, and nanoseconds must be a positive integer less than 1 billion. 返回值如果成功则返回 TRUE,失败则返回 FALSE。 If the delay was interrupted by a signal, an associative array will be returned with the components:
范例
add a note
User Contributed Notes
anybody (a) emuxperts.net
22-Aug-2006 07:03
Documentation states that "seconds" must be positive. This is not correct, 0 is possible.
m at kufi dot net
14-Aug-2005 05:03
You should take into account, if you use the function replacement down here, the CPU will be in use of 99% for the time of execution...
tecnomaniac at ig dot com dot br
27-Jul-2005 06:04
This is an alternative function to sleep_nanosecond that you can use with PHP versions below PHP 5.0. It is not very accurate if we talk about nanoseconds but the results are satisfatory. Enjoy! | ||