Stopwatch Class Reference

#include <Statistics.h>

Inheritance diagram for Stopwatch:

Receptor StopwatchCPU List of all members.

Public Member Functions

 Stopwatch ()
virtual void init ()
virtual void print (std::ostream &stream) const
virtual void start ()
virtual void stop ()
double getTime () const

Protected Attributes

time_t _startTime
time_t _stopTime
 start and stop time of duration
double _timeDist
 accumulated duration

Detailed Description

Stopwatch allows to gauge absolute durations in seconds. Durations between start()/stop() calls are accumulated in this receptor until the init() method is called.

Definition at line 95 of file Statistics.h.


Constructor & Destructor Documentation

Stopwatch  )  [inline]
 

Contructor

Definition at line 104 of file Statistics.h.


Member Function Documentation

double getTime  )  const [inline]
 

Returns:
measured (accumulated) duration in seconds

Definition at line 126 of file Statistics.h.

References Stopwatch::_timeDist.

virtual void init  )  [inline, virtual]
 

Initializes/clears receptor

Implements Receptor.

Definition at line 106 of file Statistics.h.

References Stopwatch::_timeDist.

virtual void print std::ostream &  stream  )  const [inline, virtual]
 

Prints statistics

Parameters:
stream output stream to print to

Implements Receptor.

Definition at line 107 of file Statistics.h.

References Stopwatch::_timeDist.

virtual void start  )  [inline, virtual]
 

Starts the measurement

Reimplemented in StopwatchCPU.

Definition at line 112 of file Statistics.h.

References Stopwatch::_startTime.

virtual void stop  )  [inline, virtual]
 

Stops the measurement, measured duration is add to so far gauged duration.

Reimplemented in StopwatchCPU.

Definition at line 118 of file Statistics.h.

References Stopwatch::_startTime, Stopwatch::_stopTime, and Stopwatch::_timeDist.


Member Data Documentation

time_t _startTime [protected]
 

Definition at line 97 of file Statistics.h.

Referenced by StopwatchCPU::start(), Stopwatch::start(), StopwatchCPU::stop(), and Stopwatch::stop().

time_t _stopTime [protected]
 

start and stop time of duration

Definition at line 97 of file Statistics.h.

Referenced by StopwatchCPU::stop(), and Stopwatch::stop().

double _timeDist [protected]
 

accumulated duration

Definition at line 98 of file Statistics.h.

Referenced by Stopwatch::getTime(), Stopwatch::init(), Stopwatch::print(), StopwatchCPU::stop(), and Stopwatch::stop().


The documentation for this class was generated from the following file:
Generated on Wed Jun 28 12:24:36 2006 for esg by  doxygen 1.4.6