Go to the documentation of this file.
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];
float getMinCycleTimeMS()
Get minimum cycle time since start.
float getFPS()
Get frames per second.
FPSCounter(int nDelayFrames=10)
Constructs a new FPS counter.
float getMeanCycleTimeMS()
Get mean cycle time over last 10 frames.
void update()
Updates the FPS counter.
int getUpdates()
Get number of updates.
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.
void assureFPS(float fFrameRate)
Synchronize to FPS.
The FPSCounter class provides methods for calculating the frames per second (FPS) count in periodic t...
void recalculate()
recalculates the FPS statistics