Re: How can i calculate total process time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I do that for my site and sometimes for some very strange reason it
returns a negative figure.

so i use abs() to make sure it's positive always (but then it might
not be true value...)


On Tue, 15 Mar 2005 09:08:31 -0600, Chris Boget <chris.boget@xxxxxxxx> wrote:
> > Hi, i wanna ask if anybody knows how to calculate the total process
> > time of a script. I guess there exists a
> > function to perform but i dont know which one it is. I mean if u c any
> > PHP Nuke site, it says this page is produced in .... seconds. I made
> > some codes it calculates but i dont believe that it is equal to total
> process
> > time.. Thanx..
> 
> // 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)';
> 
> thnx,
> Chris
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux