Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

fbTimer Class Reference

List of all members.

Detailed Description

Microsecond resolution timer (stopwatch) class.

Definition at line 19 of file Timer.php.

Public Member Functions

 elapsed ()
 isRunning ()
 reset ()
 start ()
 stop ()
 toString ()

Static Public Member Functions

 sprintf ($format, $secs)
 usleep ($micro_seconds)

Public Attributes

 $_start = false
 $_elapsed = 0
 $_running = false

Static Private Member Functions

 _now ()


Member Function Documentation

fbTimer::_now  )  [static, private]
 

Todo:
rewrite to store seconds and microseconds as separate fields so we don't lose precision?
Returns:
double

Definition at line 43 of file Timer.php.

Referenced by elapsed(), reset(), start(), and stop().

fbTimer::elapsed  ) 
 

Returns:
double

Definition at line 51 of file Timer.php.

References _now().

fbTimer::isRunning  ) 
 

Returns:
bool

Definition at line 62 of file Timer.php.

fbTimer::reset  ) 
 

Returns:
void

Definition at line 69 of file Timer.php.

References _now().

fbTimer::sprintf format,
secs
[static]
 

Parameters:
$format string
$secs double
Returns:
string The time, formatted as hhh:mm:ss.nnnnnnn

Definition at line 112 of file Timer.php.

Referenced by toString().

fbTimer::start  ) 
 

Returns:
double

Definition at line 77 of file Timer.php.

References _now().

fbTimer::stop  ) 
 

Returns:
double

Definition at line 90 of file Timer.php.

References _now().

fbTimer::toString  ) 
 

Returns:
string

Definition at line 102 of file Timer.php.

References sprintf().

fbTimer::usleep micro_seconds  )  [static]
 

Returns:
void

Definition at line 124 of file Timer.php.


Member Data Documentation

fbTimer::$_elapsed = 0
 

Elapsed time so far

Definition at line 29 of file Timer.php.

fbTimer::$_running = false
 

Is timer running?

Definition at line 34 of file Timer.php.

fbTimer::$_start = false
 

Last time the time was started

Definition at line 24 of file Timer.php.


The documentation for this class was generated from the following file:
Generated on Fri Mar 19 12:52:35 2004 for Freebeer by doxygen 1.3.6-20040222