127 void updateMembers(
int nCycleTime);
128 void recalculateFPS(
int nCycleTime);
129 void recalculateStats(
int nCycleTime);
131 int calculateTimeDiff(
long& nSec,
long& nUSec,
bool bSetTime =
false);
144 float m_fMinCycleTimeMS;
145 float m_fMaxCycleTimeMS;
146 float m_fLastCycleTimesMS[10];
void assureFPS(float fFrameRate)
Synchronize to FPS.
float getMeanCycleTimeMS()
Get mean cycle time over last 10 frames.
void recalculate()
recalculates the FPS statistics
float getMinCycleTimeMS()
Get minimum cycle time since start.
int getUpdates()
Get number of updates.
float getFPS()
Get frames per second.
FPSCounter(int nDelayFrames=10)
Constructs a new FPS counter.
void update()
Updates the FPS counter.
void reset()
Resets the FPS counter to its initial state.
bool getValid()
Get if calculated values are valid.
float getMaxCycleTimeMS()
Get maximum cycle time since start.