Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Monitor::Utility::Timer Class Reference

Provides interval and duration timing, both of which can be reset. More...

#include <timer.h>

List of all members.

Public Methods

 Timer ()
 Constructor. More...

virtual ~Timer ()
 Destructor. More...

unsigned interval ()
 Get duration of current interval. More...

unsigned restartInterval ()
 Restart interval timing. More...

unsigned duration ()
 Get duration of timer. More...

unsigned restart ()
 Restart timer. More...


Private Attributes

clock_t startTime
 Clock time at which timer started. More...

clock_t intervalTime
 Clock time at which current interval started. More...


Detailed Description

Provides interval and duration timing, both of which can be reset.

Definition at line 49 of file timer.h.


Constructor & Destructor Documentation

Timer::Timer  
 

Constructor.

Definition at line 45 of file timer.cpp.

References _USEMYTRACE_.

Timer::~Timer   [virtual]
 

Destructor.

Definition at line 55 of file timer.cpp.

References _USEMYTRACE_.


Member Function Documentation

unsigned Timer::duration  
 

Get duration of timer.

Returns:
Duration of timer in milliseconds.

Definition at line 94 of file timer.cpp.

References _USEMYTRACE_, and startTime.

Referenced by restart.

unsigned Timer::interval  
 

Get duration of current interval.

Returns:
Duration of current interval in milliseconds.

Definition at line 63 of file timer.cpp.

References _USEMYTRACE_, and intervalTime.

Referenced by restartInterval.

unsigned Timer::restart  
 

Restart timer.

Returns:
Duration of timer in milliseconds.

Definition at line 110 of file timer.cpp.

References _USEMYTRACE_, duration, intervalTime, and startTime.

unsigned Timer::restartInterval  
 

Restart interval timing.

Returns:
Duration of current interval in milliseconds.

Definition at line 79 of file timer.cpp.

References _USEMYTRACE_, interval, intervalTime, and restartInterval.

Referenced by restartInterval.


Member Data Documentation

clock_t Monitor::Utility::Timer::intervalTime [private]
 

Clock time at which current interval started.

Definition at line 106 of file timer.h.

Referenced by interval, restart, and restartInterval.

clock_t Monitor::Utility::Timer::startTime [private]
 

Clock time at which timer started.

Definition at line 101 of file timer.h.

Referenced by duration, and restart.


Generated on Wed Oct 29 20:51:59 2003 for Utility BC Common by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002