6 #ifndef ACE_TIME_TIMING_STATS_H 7 #define ACE_TIME_TIMING_STATS_H 34 uint16_t getMax()
const {
return mMax; }
36 uint16_t getMin()
const {
return mMin; }
38 uint16_t getAvg()
const {
return (mCount > 0) ? mSum / mCount : 0; }
53 void update(uint16_t duration) {
57 if (duration < mMin) {
60 if (duration > mMax) {
63 mExpDecayAvg = (mExpDecayAvg + duration) / 2;
67 uint16_t mExpDecayAvg;
uint16_t getExpDecayAvg() const
An exponential decay average.
TimingStats()
Constructor.
Helper class to collect timing statistics such as min, max, average.
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.