mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixing rate counter
This commit is contained in:
parent
0faab41057
commit
9f2eabe6ce
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue