Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
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 130 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
Timeroperator= (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 ( 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 18 of file Profiler.cc.


The documentation for this class was generated from the following files:

Tekkotsu v3.0
Generated Fri May 11 20:08:35 2007 by Doxygen 1.4.7