You are here: Re: How can i calculate total process time? « PHP « IT news, forums, messages
Re: How can i calculate total process time?

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>";
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация