Timer: fix atomic add

This commit is contained in:
Evgenii Meshcheriakov
2022-10-25 16:49:03 +03:00
parent e899ba9cc9
commit 940b978764
2 changed files with 3 additions and 9 deletions

View File

@@ -47,9 +47,9 @@ Timer::tickCounter (int ms)
{
if (counter >= INT_MAX)
{
counter = 0;
resetCounter();
}
counter++;
counter.fetch_add(ms, std::memory_order_relaxed);
Sleep (ms);
}