Thread: cpu consumption
View Single Post
  #4  
Old September 10th, 2010, 08:53 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Lightbulb Re: cpu consumption

I work as a programmer in the software industry and often write multi-threaded applications and I have noticed the same that the other gamers above.

I wonder if there is no "sleep" or "wait" periods within the game? I'm running winspmbt on a single core machine and it then naturally takes 100% of the computing time available for it. Not that it's a big problem, but while drawing maps for the game the responsiveness of other windows could be better if it didn't.

Is there any wait loop where the software could sleep() for couple of milliseconds or possibility of yielding by sleeping 0 milliseconds whenever there's "nothing to do". Of course I understand that the base program was written at the ages when CPUs were never idling but working in a busy loop and there was no multitasking. All computers wait at the same speed - maybe there's a place somewhere for this little sleep routine?
Reply With Quote