|
Posted by Eli on 03/06/05 15:59
M. Sokolewicz wrote:
> fetch the microtime() at the top of the script, and at the bottom of the
> script you fetch it again. Subtract the first from the later, and you're
> left with the time it took. Then change it to a human-readable form, and
> you're done. You can't get closer without hacking the ZE
On top use this:
<?php
$mtime = explode(" ",microtime());
$starttime = $mtime[1] + $mtime[0];
?>
On the end use this:
<?php
$mtime = explode(" ",microtime());
$endtime = $mtime[1] + $mtime[0];
echo "\n\n\n<hr><b>".round($endtime-$starttime,3)." sec</b>";
?>
[Back to original message]
|