mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fix for changing the OSX HighResolutionTimer interval while it's still running.
This commit is contained in:
parent
ae0383c7db
commit
13f99df268
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue