Timer Class Reference

A general stopwatch-type timer class. More...

#include <Timer.h>

List of all members.

Public Member Functions

 Timer (bool precision=false)
 If precision is set to true, then the real and system time will be measured in microseconds.
void Seconds ()
 Set precision to seconds.
void Microseconds ()
 Set precision to seconds.
bool Precision ()
 Return precision (true = microseconds, false = seconds).
void start ()
 start timer, if already started then do nothing
TimeElapsed stop ()
 stop timer and return time measured so far.
void reset ()
 reset the timer, this will reset the time measured to 0 and will leave the timer in the same status (started or stopped).
TimeElapsed getTime ()
 return time measured up to this point.
bool isStarted ()
 Return true of the timer is running.


Detailed Description

A general stopwatch-type timer class.

Member Function Documentation

TimeElapsed Timer::stop (  )  [inline]

stop timer and return time measured so far.

if timer was stopped the time returned will be 0.

void Timer::reset (  )  [inline]

reset the timer, this will reset the time measured to 0 and will leave the timer in the same status (started or stopped).


The documentation for this class was generated from the following file:
  • /home/weinberg/src/BIE/include/Timer.h

Send suggestions, questions, and feedback to WEINBERG at ASTRO dot UMASS dot EDU.
Documentation generated at Fri Mar 26 00:35:12 2010 by doxygen