starttime = $this->get_microtime();
}
function stop()
{
$this->stoptime = $this->get_microtime();
}
function spent()
{
return round(($this->stoptime - $this->starttime) * 1000, 1);
}
}
//例子
start();
//你的代码开始
$a = 0;
for($i=0; $istop();
echo 页面执行时间: .$runtime->spent(). 毫秒;
?>
