Public Member Functions

xl7::utilities::StopWatch Class Reference

#include <StopWatch.h>

List of all members.

Public Member Functions

 StopWatch (void)
 ~StopWatch (void)
 StopWatch (const StopWatch &rhs)
StopWatchoperator= (const StopWatch &rhs)
unsigned GetStartPointInTimeTicks () const
float GetStartPointInTimeSeconds () const
unsigned GetEndPointInTimeTicks () const
float GetEndPointInTimeSeconds () const
bool IsRunning () const
unsigned CalculateElapsedTimeTicks () const
float CalculateElapsedTimeSeconds () const
void Reset ()
void Start ()
void Stop ()
void Resume ()

Detailed Description

A stop watch to measure elapsed time between two points in time.


Constructor & Destructor Documentation

xl7::utilities::StopWatch::StopWatch ( void   ) 

Default constructor. Initializes and starts the stop watch at the current point in time.

xl7::utilities::StopWatch::~StopWatch ( void   )  [inline]

Destructor.

xl7::utilities::StopWatch::StopWatch ( const StopWatch rhs  ) 

Copy constructor.


Member Function Documentation

float xl7::utilities::StopWatch::CalculateElapsedTimeSeconds (  )  const

Returns the elapsed time from the start point in time to the end point in time considering the waste time due to stop watch pauses (in seconds). If the stop watch is running the result will be the elapsed time from the start point in time to the actual moment.

unsigned xl7::utilities::StopWatch::CalculateElapsedTimeTicks (  )  const

Returns the elapsed time from the start point in time to the end point in time considering the waste time due to stop watch pauses (in CPU ticks). If the stop watch is running the result will be the elapsed time from the start point in time to the actual moment.

float xl7::utilities::StopWatch::GetEndPointInTimeSeconds (  )  const

Returns the end point in time (in seconds). If the stop watch is running the result will be the actual moment.

unsigned xl7::utilities::StopWatch::GetEndPointInTimeTicks (  )  const

Returns the end point in time (in CPU ticks). If the stop watch is running the result will be the actual moment.

float xl7::utilities::StopWatch::GetStartPointInTimeSeconds (  )  const

Returns the start point in time (in seconds).

unsigned xl7::utilities::StopWatch::GetStartPointInTimeTicks (  )  const

Returns the start point in time (in CPU ticks).

bool xl7::utilities::StopWatch::IsRunning (  )  const [inline]

Returns the flag specifying whether the stop watch is running (true) or paused (false).

StopWatch & xl7::utilities::StopWatch::operator= ( const StopWatch rhs  ) 

Copy assignment operator.

void xl7::utilities::StopWatch::Reset (  ) 

Resets the stop watch. The new start point in time will be the actual moment. The stop watch will be stopped.

void xl7::utilities::StopWatch::Resume (  ) 

Resumes the stop watch. The start point in time will not be changed.

void xl7::utilities::StopWatch::Start (  ) 

Starts the stop watch. The start point in time will be reset to the actual moment.

void xl7::utilities::StopWatch::Stop (  ) 

Stops the stop watch. The end point in time will be the actual moment.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines