高难!高难!!! http://www.csdn.net/expert/topic/982/982294.xml?temp=2.750796E-02里面有一个计算速度的.你看看吧. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 class timer{ var $StartTime = 0; var $StopTime = 0; var $TimeSpent = 0; function start() { $this->StartTime = microtime(); } function stop() { $this->StopTime = microtime(); } function spent() { if ($this->TimeSpent) { return $this->TimeSpent; } else { $StartMicro = substr($this->StartTime,0,10); $StartSecond = substr($this->StartTime,11,10); $StopMicro = substr($this->StopTime,0,10); $StopSecond = substr($this->StopTime,11,10); $start = doubleval($StartMicro) + $StartSecond; $stop = doubleval($StopMicro) + $StopSecond; $this->TimeSpent = $stop - $start; return substr($this->TimeSpent,0,8); } } // end function spent();} //end class timer;$timer = new timer;$timer->start();$timer->stop();echo "运行时间花了".$timer->spent()."秒<br>"; 求解释一个正则 get_include_path()是什么意思? PHP如何调出“打开”或“另存为”窗口 系统重装后mysql数据恢复问题~ 文件的问题,在线等,急 菜鸟级问题,请问,如果实现奇偶行不一样的输出效果?高分~~~ 麻烦大家了,PHP装不起来,急人! 请教:在PHP中同时使用了javascript和vbscript 请高手看看下面一段程序,关于认证的!怎么老是调试不出? PHP如何通过URL访问,获得新的URL 【调用百度地图】 session_start()问题?急 在线求助
{
var $StartTime = 0;
var $StopTime = 0;
var $TimeSpent = 0; function start()
{
$this->StartTime = microtime();
}
function stop()
{
$this->StopTime = microtime();
}
function spent()
{
if ($this->TimeSpent)
{
return $this->TimeSpent;
}
else
{
$StartMicro = substr($this->StartTime,0,10);
$StartSecond = substr($this->StartTime,11,10);
$StopMicro = substr($this->StopTime,0,10);
$StopSecond = substr($this->StopTime,11,10);
$start = doubleval($StartMicro) + $StartSecond;
$stop = doubleval($StopMicro) + $StopSecond;
$this->TimeSpent = $stop - $start;
return substr($this->TimeSpent,0,8);
}
} // end function spent();
} //end class timer;
$timer = new timer;
$timer->start();
$timer->stop();
echo "运行时间花了".$timer->spent()."秒<br>";