#include <XFuTimingCounter.h>
Public Member Functions | |
virtual void | start () |
Starts counting of one timing iteration. | |
virtual void | stop () |
Stops counting of one timing iteration. | |
virtual void | pause () |
Pauses the counting. | |
virtual void | resume () |
Resumes the counting. | |
virtual void | reset () |
Resets the counter. | |
virtual REAL | getTime () |
Returns the average time spent between start() and stop() calls. | |
virtual | ~XFuTimingCounter () |
Virtual destructor. | |
Static Public Member Functions | |
XFuTimingCounter * | create (INT32 aSampleCount) |
Constructs the timing counter with aSampleCount amount of samples. | |
Protected Member Functions | |
XFuTimingCounter () | |
Protected Attributes | |
INT32 * | mSamples |
INT32 | mSampleCount |
INT32 | mMaxSampleCount |
INT32 | mFirstSample |
INT32 | mCurrentSample |
INT32 | mCurrentTick |
INT32 | mTickDiff |
INT32 | mState |
This counter can be used for evaluating time spend within functions even in the case the time is less than the resolution of the clock. The timer takes sliding average of large amount of samples, and thus gives results that are statistically more accurate than the clock itself.
Definition at line 25 of file XFuTimingCounter.h.
|
Virtual destructor.
Definition at line 121 of file XFuTimingCounter.h. References mSamples. |
|
Definition at line 127 of file XFuTimingCounter.h. References mCurrentSample, mFirstSample, mMaxSampleCount, mSampleCount, and mSamples. Referenced by create(). |
|
Constructs the timing counter with aSampleCount amount of samples.
Definition at line 29 of file XFuTimingCounter.h. References mMaxSampleCount, mSamples, and XFuTimingCounter(). |
|
Returns the average time spent between start() and stop() calls.
Definition at line 112 of file XFuTimingCounter.h. References mCurrentSample, mFirstSample, mSampleCount, and mSamples. |
|
Pauses the counting.
Definition at line 80 of file XFuTimingCounter.h. References mCurrentTick, mState, mTickDiff, XFU_TIMINGCOUNTER_RUNNING, and XFU_TIMINGCOUNTER_STARTED. Referenced by stop(). |
|
Resets the counter.
Definition at line 103 of file XFuTimingCounter.h. References mCurrentSample, mFirstSample, mSampleCount, and mState. |
|
Resumes the counting.
Definition at line 92 of file XFuTimingCounter.h. References mCurrentTick, mState, XFU_TIMINGCOUNTER_RUNNING, and XFU_TIMINGCOUNTER_STARTED. Referenced by start(). |
|
Starts counting of one timing iteration.
Definition at line 52 of file XFuTimingCounter.h. References mState, mTickDiff, resume(), and XFU_TIMINGCOUNTER_STARTED. |
|
Stops counting of one timing iteration.
Definition at line 60 of file XFuTimingCounter.h. References mCurrentSample, mFirstSample, mMaxSampleCount, mSampleCount, mSamples, mState, mTickDiff, pause(), and XFU_TIMINGCOUNTER_STARTED. |
|
Definition at line 140 of file XFuTimingCounter.h. Referenced by getTime(), reset(), stop(), and XFuTimingCounter(). |
|
Definition at line 141 of file XFuTimingCounter.h. |
|
Definition at line 139 of file XFuTimingCounter.h. Referenced by getTime(), reset(), stop(), and XFuTimingCounter(). |
|
Definition at line 138 of file XFuTimingCounter.h. Referenced by create(), stop(), and XFuTimingCounter(). |
|
Definition at line 137 of file XFuTimingCounter.h. Referenced by getTime(), reset(), stop(), and XFuTimingCounter(). |
|
Definition at line 136 of file XFuTimingCounter.h. Referenced by create(), getTime(), stop(), XFuTimingCounter(), and ~XFuTimingCounter(). |
|
Definition at line 143 of file XFuTimingCounter.h. Referenced by pause(), reset(), resume(), start(), and stop(). |
|
Definition at line 142 of file XFuTimingCounter.h. |
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |