AceCommon
1.6.0
Arduino library for low-level common functions and features with no external dependencies
|
Helper class to collect timing statistics such as min, max, average, and exponential-decay average. More...
#include <TimingStats.h>
Public Member Functions | |
TimingStats () | |
Constructor. More... | |
TimingStats (const TimingStats &)=default | |
Default copy constructor. | |
TimingStats & | operator= (const TimingStats &)=default |
Default assignment operator. | |
void | reset () |
Reset the object to its initial state, except mCounter which is never reset. | |
uint16_t | getMax () const |
Return the maximum since the last reset(). | |
uint16_t | getMin () const |
Return the minium since the last reset(). | |
uint16_t | getAvg () const |
Return the average since the last reset(). More... | |
uint16_t | getExpDecayAvg () const |
An exponential decay average since the last reset(). | |
uint16_t | getCount () const |
Number of times update() was called since last reset(). | |
uint16_t | getCounter () const |
Number of times update() was called from the beginning of time. More... | |
void | update (uint16_t duration) |
Add the given duration (often in milliseconds) to the statistics. | |
Helper class to collect timing statistics such as min, max, average, and exponential-decay average.
Definition at line 36 of file TimingStats.h.
|
inline |
|
inline |
Return the average since the last reset().
Returns 0 if update() has never been called.
Definition at line 74 of file TimingStats.h.
|
inline |
Number of times update() was called from the beginning of time.
Never reset. This is useful to determining how many times update() was called since it was last checked from the client code.
Definition at line 87 of file TimingStats.h.