Timer: simply wakeup condition

This commit is contained in:
Michael Davidsaver
2018-10-19 09:23:00 -07:00
parent f54602dead
commit 434b9f7a9f

View File

@@ -184,8 +184,8 @@ void Timer::schedulePeriodic(
timerCallback->timeToRun = now + delay;
timerCallback->period = period;
wakeup = waiting && (queue.empty() || queue.front()->timeToRun > timerCallback->timeToRun);
addElement(timerCallback);
wakeup = waiting && queue.front()==timerCallback;
}
if(wakeup) waitForWork.signal();
}