Code: Select all
if love.timer then love.timer.sleep(0.001) end
My guess: Maybe, for the timer to work with high accuracy?
Code: Select all
if love.timer then love.timer.sleep(0.001) end
There has to be some sort of set limit to the frames that you can get.veethree wrote:Out of curiosity, what's the purpose of the 1000 fps limit? Not that 1000 fps isn't enough.
Code: Select all
void Timer::sleep(double seconds) const
{
if (seconds > 0)
love::sleep((unsigned int)(seconds*1000));
}
Code: Select all
void sleep(unsigned int ms)
{
SDL_Delay(ms);
}
Note: Count on a delay granularity of at least 10 ms. Some platforms have shorter clock ticks but this is the most common.
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 5 guests