| core_util

# Class: Bs_StopWatch Source Location: /core/util/Bs_StopWatch.class.php
### Class Overview
Stopwatch - class to measure time intervals in microseconds. #### Author(s): sam blum <at blueshoes dot org> #### Version: 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:17:51 $ #### Copyright: blueshoes.org, part of the php application framework | ### Variables $_lastDeltaTime $_lastTakeTime $_startTime $_stops | ### Methods Bs_StopWatch getDelta getTime reset takeTime toHtml
### Inherited Variables | ### Inherited Methods
### Class Details [line 29] Stopwatch - class to measure time intervals in microseconds. ... well... hey it's a stopwatch, what can I say more about it :-) You can take times during a code run and at the end get a time table as HTML or text table. The output will contain total and as delta between each take in microseconds. NOTE: This class makes use of php's microtime(). from the manual: "This function is only available on operating systems that support the gettimeofday() system call." I know that linux and windows do that. Haven't seen anything about other os. --sb This class is no more an extension from Bs_Object because I need it in Bs_Object and I don't want any conflicts. I think we can do this with a basic object like this one. #### Tags:
access: | public
version: | 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:17:51 $
copyright: | blueshoes.org, part of the php application framework
author: | sam blum <at blueshoes dot org>
[ Top ] ### Class Variables #### $_lastDeltaTime = NULL [line 34]
Type: | mixed
[ Top ] #### $_lastTakeTime = NULL [line 33]
Type: | mixed
[ Top ] #### $_startTime = NULL [line 31]
Type: | mixed
[ Top ] #### $_stops = NULL [line 32]
Type: | mixed
[ Top ] ### Class Methods ### constructor Bs_StopWatch [line 40]
`Bs_StopWatch Bs_StopWatch( )`
Constructor. [ Top ] ### method getDelta [line 84]
`integer getDelta( )`
Returns total time in ms since last call to getDelta() #### Tags:
return: | Total time in ms since since last call.
access: | public
[ Top ] ### method getTime [line 74]
`integer getTime( )`
Returns total time in ms since reset. #### Tags:
return: | Total time in ms since reset.
access: | public
[ Top ] ### method reset [line 49]
`void reset( )`
Resets the stopwatch. #### Tags:
access: | public
[ Top ] ### method takeTime [line 61]
`void takeTime( [string $info = ''])`
Takes a time and calculates the total time so far and the delta time since the last take. These values are stored. #### Tags:
access: | public
#### Parameters:
string | $info | Add any info as memo for what the time take stands for.
[ Top ] ### method toHtml [line 97]
`string toHtml( [string $title = ''])`
Displays all stops so far as HTML table. #### Tags:
return: | an html table
access: | public
#### Parameters:
string | $title | a title to display
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:12:57 +0100 by phpDocumentor 1.2.3