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:
parent
72aee7f2f9
commit
218ddf1193
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue