wavelength 1.0.0
Loading...
Searching...
No Matches
rateaverager.h
Go to the documentation of this file.
1#pragma once
2
10public:
18 explicit RateAverager(int nTicksPerBar);
19
26 void Reset();
27
36 void Sample(int nSlot, int nTick);
37
45 float GetMean() const;
46
48 float GetSum() const {
49 return mSum;
50 }
51
52private:
53 int mTicksPerBar;
54 float mSum;
55 int mCount;
56 int mLastTick;
57};
void Reset()
Forget every sample.
float GetSum() const
Definition rateaverager.h:48
RateAverager(int nTicksPerBar)
Construct an average with no samples.
float GetMean() const
Report the average rate.
void Sample(int nSlot, int nTick)
Add a gem.