diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index 5e0ba4500b..7bdbc55baf 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -1150,10 +1150,11 @@ struct HighResolutionTimer::Pimpl void start (int newPeriod) { - periodMs = newPeriod; - - if (thread == 0) + if (periodMs != newPeriod) { + stop(); + periodMs = newPeriod; + shouldStop = false; if (pthread_create (&thread, nullptr, timerThread, this) == 0)