|
resonance 1.0.1
|
The EE cycle clock the engine times itself against. More...
#include <timer.h>
Static Public Member Functions | |
| static void | Init () |
| Start the clock from the current counter reading. | |
Static Public Attributes | |
| static float | sClock2Ms |
| Milliseconds per EE cycle, the reciprocal of kCyclesPerMillisecond. | |
| static int | sElapsedMs |
| Word Init() clears beside the cycle state. | |
| static long long | sElapsedCycles |
| Cycles accumulated across every read. | |
| static unsigned | sElapsedTimer |
| The counter reading the last call took. | |
| static unsigned | sLastCycleDelta |
| The difference the last call added to the total. | |
The EE cycle clock the engine times itself against.
Every member is static, and the class emits no RTTI. Its name comes from the debugging symbols of the North American demo release. GetElapsedMilliseconds() accumulates into the members, and around thirty routines across the engine inline GetElapsedMilliseconds().
|
static |
Start the clock from the current counter reading.
The total and the last difference become zero and the last reading becomes the counter. The counter is read twice and the first reading is discarded. The static initialiser at 0x004662d0, in the unit that defines the out-of-line GetElapsedMilliseconds(), is the one caller.
|
static |
Milliseconds per EE cycle, the reciprocal of kCyclesPerMillisecond.
Init() writes it and no routine in the image reads it.
|
static |
Word Init() clears beside the cycle state.
No routine in the image reads it.
|
static |
Cycles accumulated across every read.
Accumulating differences rather than counter readings makes the total correct across a wrap of the 32-bit counter.
|
static |
The counter reading the last call took.
|
static |
The difference the last call added to the total.
The word follows sElapsedTimer, and Init() addresses it through that member's base. Every caller writes this word and none reads it.