Cocoa Port: In RunCoreThread(), don’t use a potentially more expensive wait method before doing a cheaper time comparison first.
This commit is contained in:
parent
bac10c7618
commit
cee6867bd8
|
@ -1292,7 +1292,10 @@ static void* RunCoreThread(void *arg)
|
|||
else
|
||||
{
|
||||
// If there is any time left in the loop, go ahead and pad it.
|
||||
execControl->WaitUntilAbsoluteTime(startTime + frameTime);
|
||||
if ( (execControl->GetCurrentAbsoluteTime() - startTime) < frameTime )
|
||||
{
|
||||
execControl->WaitUntilAbsoluteTime(startTime + frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
const double currentExecutionSpeed = standardNDSFrameTime / (execControl->GetCurrentAbsoluteTime() - startTime);
|
||||
|
|
Loading…
Reference in New Issue