1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Avoided a wrap-around timeout error in runDispatchLoopUntil()

This commit is contained in:
jules 2019-02-18 18:08:34 +00:00
parent 72aee7f2f9
commit 218ddf1193

View file

@ -383,7 +383,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
jassert (millisecondsToRunFor >= 0);
jassert (isThisTheMessageThread()); // must only be called by the message thread
uint32 endTime = Time::getMillisecondCounter() + (uint32) millisecondsToRunFor;
auto endTime = Time::currentTimeMillis() + millisecondsToRunFor;
while (quitMessagePosted.get() == 0)
{
@ -399,7 +399,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
if (e != nil && (isEventBlockedByModalComps == nullptr || ! (*isEventBlockedByModalComps) (e)))
[NSApp sendEvent: e];
if (Time::getMillisecondCounter() >= endTime)
if (Time::currentTimeMillis() >= endTime)
break;
}
}