59 for (
size_t i = 0; i <
_seconds; i++)
94 for (
size_t i = 0; i < seconds; i++)
97 _fps = seconds ? (frames / seconds) : 0;
size_t _seconds
Number of seconds over which to average the FPS.
void reset(PointerType o=0)
Resets the pointer with the new value.
size_t _currentSecond
Current second we measure.
Common::ScopedArray< uint32 > _frames
All frame counters.
void calculateFPS()
Calculate the average FPS value.
FPSCounter(size_t secs)
Average the FPS over that many seconds.
Utility templates and functions.
void reset()
Reset the counter.
The global events manager.
uint32 _fps
The current FPS value.
bool _hasFullSeconds
Got all samples?
#define EventMan
Shortcut for accessing the events manager.
uint32 getFPS() const
Get the current FPS value.
uint32 _lastSampled
The last time a finished frame was signaled.
void finishedFrame()
Signal a finished frame.