mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Make RateCounter rate atomic
This commit is contained in:
parent
3298883774
commit
6d7f8f4a6f
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
#define hifi_Shared_RateCounter_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
|
||||
|
@ -42,7 +43,7 @@ public:
|
|||
private:
|
||||
uint64_t _start { usecTimestampNow() };
|
||||
size_t _count { 0 };
|
||||
float _rate { 0 };
|
||||
std::atomic<float> _rate { 0 };
|
||||
const float _scale { powf(10, PRECISION) };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue