switch-controller: resolve #21

This commit is contained in:
Vasily Davydov
2022-10-17 13:36:08 +03:00
parent 9358ede4df
commit b8780772a1
3 changed files with 45 additions and 5 deletions

View File

@@ -55,11 +55,11 @@ Timer::Sleep (int ms)
int
Timer::getCounter ()
{
return counter;
return counter.load (std::memory_order_relaxed);
}
void
Timer::resetCounter ()
{
counter = 0;
counter.store (0, std::memory_order_relaxed);
}