phing-system-util

# Class: Timer Source Location: /system/util/Timer.php
### Class Overview
This class can be used to obtain the execution time of all of the scripts that are executed in the process of building a page. #### Author(s): Hans Lellelid <hans@xmpl.org> Charles Killian #### Version: $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $ | ### Variables $etime $stime | ### Methods getElapsedTime start stop
### Class Details [line 43] This class can be used to obtain the execution time of all of the scripts that are executed in the process of building a page. Example: To be done before any scripts execute: $Timer = new Timer; $Timer->Start_Timer(); To be done after all scripts have executed: $timer->Stop_Timer(); $timer->Get_Elapsed_Time(int number_of_places); #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
author: | Charles Killian
version: | $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $
[ Top ] ### Class Variables #### $etime = [line 49] end time #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $stime = [line 46] start time #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### method getElapsedTime [line 79]
`string getElapsedTime( [$places $places = 5])`
This function returns the elapsed time in seconds. Call start_time() at the beginning of script execution and end_time() at the end of script execution. Then, call elapsed_time() to obtain the difference between start_time() and end_time(). #### Tags:
return: | Properly formatted time.
#### Parameters:
$places | $places | decimal place precision of elapsed time (default is 5)
[ Top ] ### method start [line 56]
`void start( )`
This function sets the class variable $stime to the current time in microseconds. #### Tags:
access: | public
[ Top ] ### method stop [line 65]
`void stop( )`
This function sets the class variable $etime to the current time in microseconds. [ Top ] Documentation generated on Mon, 19 Oct 2009 10:52:15 +0200 by phpDocumentor 1.4.3