Browse Source

HighResolutionTimer: Ensure that a new interval applies from the moment of calling startTimer()

Before this commit an already started timer would wait until the
previously set tick time before applying the new one. This problem seems
to have affected the Windows implementation only.
v7.0.9
attila Attila Szarvas 2 years ago
parent
commit
b5c775210f
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modules/juce_core/threads/juce_HighResolutionTimer.cpp

+ 2
- 0
modules/juce_core/threads/juce_HighResolutionTimer.cpp View File

@@ -45,6 +45,8 @@ public:
nextTickTime = steady_clock::now() + milliseconds (periodMillis);
}
waitEvent.notify_one();
if (! isThreadRunning())
startThread (Thread::Priority::high);
}


Loading…
Cancel
Save