Separating logic update from render drawing code in a single thread using sleep I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update draw code to maximize performance without limiting the drawing rate and provide a constant logic update rate based on time? My current pseudo code is as follows loop draw() if (ticksElapsed() gt 100) update() ticks ticksElapsed() The problem is the drawing code hinders the performance of the update() rate. And it consumes 100 cpu because if sleep is thrown in, it throws off both drawing logic functions. I am also using SDL and it doesn't seem to have a vsync option. I've also heard of the terms fixed and variable time stepping however I'm not sure how that can be done with sleep()