Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirk <kklobe@gmail.com>2021-11-11 04:03:07 +0300
committerKirk <kklobe@gmail.com>2021-11-11 04:03:14 +0300
commitcb944b266f69a7237d9f6f4dd05752243d294236 (patch)
tree619f8b09c379b54b727da44da75f8bf82c45c736
parent5f2901ddb703a5b4dd9d401609d6c0b2521e2d5b (diff)
Make static vars thread_localkk/kc/gta-resolution-fix-3
-rw-r--r--include/timer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/timer.h b/include/timer.h
index bde8037ec..61515ff90 100644
--- a/include/timer.h
+++ b/include/timer.h
@@ -95,10 +95,10 @@ static inline void DelayUs(const int microseconds)
}
static inline void DelayPrecise(double seconds) {
- static double estimate = 5e-3;
- static double mean = 5e-3;
- static double m2 = 0;
- static int64_t count = 1;
+ thread_local double estimate = 5e-3;
+ thread_local double mean = 5e-3;
+ thread_local double m2 = 0;
+ thread_local int64_t count = 1;
while (seconds > estimate) {
const auto start = std::chrono::steady_clock::now();