|
Rebel Fork Framework
|
Accumulates statistics for specified number of intervals. More...
#include <Urho3D/Core/Timer.h>
Public Member Functions | |
| TimedCounter (int intervalCount, unsigned intervalLengthMs) | |
| int | GetCurrent () const |
| Return current interval index. GetData()[GetCurrent()] returns a value of last accumulated interval. | |
| const ea::vector< float > & | GetData () const |
| Return all recorded samples. Use GetCurrent() to determine oldest/newest sample index. | |
| void | AddSample (float value) |
| Accumulate a new datapoint. | |
| float | GetAverage () |
| Return average of all fully accumulated samples. | |
| float | GetLast () |
| Return last fully accumulated sample. | |
Private Member Functions | |
| void | RotateIfNeeded () |
Private Attributes | |
| Timer | timer_ |
| int | intervalLength_ = 0 |
| int | intervalCurrent_ = 0 |
| Index in data_ pointing to last complete interval. | |
| float | accumulator_ = 0.0f |
| Samples of current incomplete interval. | |
| ea::vector< float > | data_ |
| All complete accumulated samples. | |
Accumulates statistics for specified number of intervals.