| 
 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
 
  
Navigation:
[Reply to this message] 
 |