Reply to Re: [PHP] How can i calculate total process time?

Your name:

Reply:


Posted by John Nichel on 03/15/05 17:22

Chris Boget wrote:
<snip>
> // At the very beginning of the script
> $startTime = date( 'U' );
>
> // At the very end of the script
> $endTime = date( 'U' );
>
> echo 'Total processing time: ' . ( $endTime - $startTime ) . ' second(s)';
</snip>

I would use microtime instead of date('U') or time(); since date and
time deal in full seconds. If your script takes less than a second to
process, you could end up with equal starting and ending times,
resulting in 0 seconds to process.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com

[Back to original 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

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