65 mCycles = nCount - mStart;
74 if (mRunning++ == 0) {
83 if (--mRunning == 0) {
void SetLastMs(float fLastMs)
Definition timer.h:121
void SetName(const char *pszName)
Definition timer.h:131
void Split()
Restart the measurement at the current counter reading.
Definition timer.h:62
void Start()
Raise the start count, and take the counter reading when the count leaves zero.
Definition timer.h:73
void SetRunning(int nRunning)
Definition timer.h:136
static Timer * Find(const char *pszName)
Find a timer of the registry of named timers.
const char * GetName() const
Definition timer.h:126
static std::vector< Timer > sTimers
The registry of named timers.
Definition timer.h:103
Timer()
Construct a stopped timer with no measurement.
Definition timer.h:19
void Stop()
Lower the start count, and add the cycles since the start to mCycles when it arrives at zero.
Definition timer.h:82
void Pause()
Suspend a running timer, adding the cycles since the start to mCycles.
Definition timer.h:39
float GetLastMs() const
Definition timer.h:116
void Resume()
Continue a timer Pause() suspended from the current counter reading.
Definition timer.h:49
void SetCycles(unsigned nCycles)
Definition timer.h:111
void Reset()
Stop the timer and record the cycles measured so far in milliseconds in mLastMs.
Definition timer.h:28
unsigned GetCycles() const
Definition timer.h:106
unsigned ReadCycleCount()
Read the free-running cycle counter.
float gSystemCycles2Ms
Milliseconds per EE cycle.
void TimerSleep(int nMs)
Busy-wait on the system clock.
void TimerTerminate()
Shut the timers down.
void TimerInit()
Set the cycle conversion and restart the system clock from zero.
void TimerLoadNames()
Build the named timers, one for each symbol of the timer block of the system configuration.