Fixing rate counter

This commit is contained in:
Brad Davis 2016-04-12 14:11:56 -07:00
parent 0faab41057
commit 9f2eabe6ce

View file

@ -27,6 +27,8 @@ public:
float currentCount = _count;
float intervalSeconds = (float)currentIntervalMs / (float)MSECS_PER_SECOND;
_rate = roundf(currentCount / intervalSeconds * _scale) / _scale;
_start = now;
_count = 0;
};
_count += count;
}