Simpatico  v1.10
List of all members | Public Member Functions
Util::Timer Class Reference

Detailed Description

Wall clock timer.

A Timer keeps track of the time elapsed during one or more interval. Each interval begins when start() is called and ends when stop() is called. If start() and stop() are invoked repeatedly, the timer accumulates the time elapses in multiple intervals. The accumulated time is returned by the time() method, and can be reset to zero by the clear() method.

Definition at line 30 of file Timer.h.

#include <Timer.h>

Public Member Functions

 Timer ()
 Constructor. More...
 
void start ()
 Start the clock. More...
 
void stop ()
 Stop the clock, increment time. More...
 
void clear ()
 Set accumulated time to zero. More...
 
double time ()
 Get the accumulated time, in seconds. More...
 
bool isRunning ()
 Is the timer running? More...
 

Constructor & Destructor Documentation

Util::Timer::Timer ( )
inline

Constructor.

Definition at line 69 of file Timer.h.

Member Function Documentation

void Util::Timer::start ( )
inline
void Util::Timer::stop ( )
inline
void Util::Timer::clear ( )
inline

Set accumulated time to zero.

Definition at line 101 of file Timer.h.

double Util::Timer::time ( )
inline
bool Util::Timer::isRunning ( )
inline

Is the timer running?

Definition at line 116 of file Timer.h.


The documentation for this class was generated from the following file: