#include <icy/av/fpscounter.h>FPS counter based on the simple moving average (SMA) algorithm.
double fpsint64_t frames| Return | Name | Description |
|---|---|---|
FPSCounter inline | Initialise the counter with all zeroes. | |
void | reset inline | Reset all counters and the SMA window to zero. |
void | tick inline | Record a new frame and update the FPS estimate. Must be called once per frame. Updates fps and increments frames. |
inline
inline FPSCounter()Initialise the counter with all zeroes.
inline
inline void reset()Reset all counters and the SMA window to zero.
inline
inline void tick()Record a new frame and update the FPS estimate. Must be called once per frame. Updates fps and increments frames.
int tickIndexclock_t prevTickclock_t tickSumclock_t tickList| Return | Name | Description |
|---|---|---|
double | updateAvg inline |
inline
inline double updateAvg(clock_t newTick)