Home  >  Article  >  php教程  >  PHP计时类的例子

PHP计时类的例子

WBOY
WBOYOriginal
2016-06-21 09:07:51942browse

一个例子
include ("phptimer.inc");
$timer = new PHP_timer;
$timer->start();
$timer->addmarker("marker 1");
$timer->stop();
$timer->debug();
$timer->showtime();

?>
返回应该是这样子的。

Script execution debug information:
Marker    Time    Diff
Start    968594548.36899100    -
here be marker 1    968594548.36970100    0.000710
Stop    968594548.37014500    0.000444
0.001154



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn