The attached patch reduces alex4's CPU usage. It makes the following changes:
- yield_timeslice() calls are replaced with rest(). yield_timeslice has no useful effect on Linux, I don't know about other platforms. This change might be a problem on platforms where rest() has a very coarse resolution (maybe DOS?)
- I limited the framerate to the speed of the game logic. Screen redraws without a game update in between are wasted, as nothing changed.
patch for high cpu usage