usleep
(PHP 3, PHP 4 )usleep -- Delay execution in microseconds
Description
void usleep ( int micro_seconds)
The usleep() function delays program execution for the given number of micro_seconds. A microsecond is one millionth of a second. 注: This function does not work on Windows systems. See also sleep() and set_time_limit().
有问题先看手册
(PHP 3, PHP 4 )usleep -- Delay execution in microseconds
Description
void usleep ( int micro_seconds)
The usleep() function delays program execution for the given number of micro_seconds. A microsecond is one millionth of a second. 注: This function does not work on Windows systems. See also sleep() and set_time_limit().
有问题先看手册
This function does not work on Windows systems.
这种答案楼主提问前能不考虑吗?楼主要的是放之四海的解决方案。而且已经找到了:
function microdelay($delay) {
$UNUSED_PORT=31238; //make sure this port isn't being used on your server
@fsockopen("tcp://ftp.noexist.org",$UNUSED_PORT,$errno,$errstr,$delay);
}$delay是浮点数,可以精确到0.001秒。