No, it's not a solution. But it will give better results than a static timeout timer.
Either use 0 or immediately calculate the next frame (and skip rendering it).By the way: What happens if render takes more than 20 ms? 20-now.elapsed() would be a negative value. Should I control that case and pass a 0 to 20-now.elapsed()?
But first see how many frames per second can your application obtain as faldżip suggested.
Bookmarks