function microtime_float()
{
list($usec, $sec) = explode(” “, microtime());
return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
// Sleep for a while
usleep(100);
$time_end = microtime_float();
$time = $time_end – $time_start;
echo “Did nothing in $time seconds\n”;
作者:吴旭晓 | 来源:个人博客 | 点击量:2614 | 发布时间:2010-10-10
最新留言 |
返回上一页 |
返回首页