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 118 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 TimeET & | startTime () |
| 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 122 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 15 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 124 of file Profiler.h. |
Profiler::Timer::~Timer |
( |
|
) |
|
|
|
destructor - stops the timer, reports results
Definition at line 20 of file Profiler.cc. |
Member Function Documentation
TimeET Profiler::Timer::elapsed |
( |
|
) |
[inline] |
|
Timer Profiler::Timer::operator= |
( |
const Timer & |
t |
) |
[inline] |
|
|
not that you should need it, does same as default
Definition at line 125 of file Profiler.h. |
void Profiler::Timer::setID |
( |
unsigned int |
id, |
|
|
Profiler * |
prof |
|
) |
|
|
void Profiler::Timer::start |
( |
|
) |
[inline] |
|
|
starts timer (or resets it)
Definition at line 128 of file Profiler.h. |
const TimeET& Profiler::Timer::startTime |
( |
|
) |
[inline] |
|
Friends And Related Function Documentation
|
Profiler will need to read out some data that no one else should be depending on.
Definition at line 120 of file Profiler.h. |
Member Data Documentation
The documentation for this class was generated from the following files:
|