mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
The video decoding thread efficiently waits for a video to be created before doing anything, rather than sleeping for 2ms in a loop. Reduces the CPU usage of the video worker thread to ~0% when no videos are loaded.
This commit is contained in:
@@ -114,7 +114,7 @@ double Timer::getTimerPeriod()
|
||||
return 0;
|
||||
}
|
||||
|
||||
double Timer::getTimeSinceEpoch()
|
||||
double Timer::getTime()
|
||||
{
|
||||
// The timer period (reciprocal of the frequency.)
|
||||
static const double timerPeriod = getTimerPeriod();
|
||||
@@ -145,10 +145,5 @@ double Timer::getTimeSinceEpoch()
|
||||
#endif
|
||||
}
|
||||
|
||||
double Timer::getTime() const
|
||||
{
|
||||
return getTimeSinceEpoch();
|
||||
}
|
||||
|
||||
} // timer
|
||||
} // love
|
||||
|
||||
Reference in New Issue
Block a user