Homepage Demos Overview Downloads Tutorials Reference
Credits

Profiler::Timer Class Reference

#include <Profiler.h>

List of all members.


Detailed Description

Measures the time that this class exists, reports result to a profiler.

Don't bother trying to use this as a quick timer - just use TimeET directly. But there are functions to get the elapsed time and such if you insist.

Definition at line 111 of file Profiler.h.

Public Member Functions

 Timer ()
 constructor - starts timer, but you can restart it...

 Timer (unsigned int id, Profiler *prof)
 constructor - starts the timer, sets current timer in prof

 Timer (const Timer &t)
 copy constructor, not that you should need it, does same as default

Timer operator= (const Timer &t)
 not that you should need it, does same as default

 ~Timer ()
 destructor - stops the timer, reports results

void setID (unsigned int id, Profiler *prof)
 sets the ID and profiler, also starts timer

void start ()
 starts timer (or resets it)

const TimeETstartTime ()
 returns time of start

TimeET elapsed ()
 returns time since start


Protected Attributes

Profiler_prof
 the profiler this should report to

unsigned int _id
 the id number for this code section (See example in beginning of class documentation for how these are assigned)

unsigned int _parent
 the id number of the timer this timer is under

TimeET _t
 the time this timer was created


Friends

class Profiler
 Profiler will need to read out some data that no one else should be depending on.


Constructor & Destructor Documentation

Profiler::Timer::Timer  )  [inline]
 

constructor - starts timer, but you can restart it...

Definition at line 115 of file Profiler.h.

Profiler::Timer::Timer unsigned int  id,
Profiler prof
 

constructor - starts the timer, sets current timer in prof

Tells the profiler that this is now the active timer, so new timers will fit "under" this.
Timer isn't actually started here, lets Profiler::setCurrent do that.

Parameters:
prof profiler to report results to. If is NULL, does nothing.
id id number for this function. See Profiler::getNewID() for what you should pass this

Definition at line 14 of file Profiler.cc.

Profiler::Timer::Timer const Timer t  )  [inline]
 

copy constructor, not that you should need it, does same as default

Definition at line 117 of file Profiler.h.

Profiler::Timer::~Timer  ) 
 

destructor - stops the timer, reports results

Definition at line 19 of file Profiler.cc.


Member Function Documentation

TimeET Profiler::Timer::elapsed  )  [inline]
 

returns time since start

Definition at line 123 of file Profiler.h.

Referenced by Profiler::finished().

Timer Profiler::Timer::operator= const Timer t  )  [inline]
 

not that you should need it, does same as default

Definition at line 118 of file Profiler.h.

void Profiler::Timer::setID unsigned int  id,
Profiler prof
 

sets the ID and profiler, also starts timer

Definition at line 24 of file Profiler.cc.

Referenced by MMCombo::ReadySendJoints().

void Profiler::Timer::start  )  [inline]
 

starts timer (or resets it)

Definition at line 121 of file Profiler.h.

const TimeET& Profiler::Timer::startTime  )  [inline]
 

returns time of start

Definition at line 122 of file Profiler.h.


Friends And Related Function Documentation

friend class Profiler [friend]
 

Profiler will need to read out some data that no one else should be depending on.

Definition at line 113 of file Profiler.h.


Member Data Documentation

unsigned int Profiler::Timer::_id [protected]
 

the id number for this code section (See example in beginning of class documentation for how these are assigned)

Definition at line 126 of file Profiler.h.

Referenced by Profiler::finished(), operator=(), Profiler::setCurrent(), setID(), and Timer().

unsigned int Profiler::Timer::_parent [protected]
 

the id number of the timer this timer is under

Definition at line 127 of file Profiler.h.

Referenced by Profiler::finished(), operator=(), Profiler::setCurrent(), and Timer().

Profiler* Profiler::Timer::_prof [protected]
 

the profiler this should report to

Definition at line 125 of file Profiler.h.

Referenced by operator=(), setID(), Timer(), and ~Timer().

TimeET Profiler::Timer::_t [protected]
 

the time this timer was created

Definition at line 128 of file Profiler.h.

Referenced by elapsed(), operator=(), Profiler::setCurrent(), start(), startTime(), and Timer().


The documentation for this class was generated from the following files:
Tekkotsu v2.0
Generated Wed Jan 21 03:23:21 2004 by Doxygen 1.3.4