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:
Alex Szpakowski
2016-03-05 21:56:51 -04:00
parent 7370bd56ce
commit a0bbcce8ee
8 changed files with 76 additions and 40 deletions
+1 -6
View File
@@ -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
+1 -2
View File
@@ -76,8 +76,7 @@ public:
* and increases monotonically.
* @return The time (in seconds)
**/
virtual double getTime() const;
static double getTimeSinceEpoch();
static double getTime();
private: