Quote:Original post by dormlock
I beg to differ on not calling sleep. If your using threads in your engine then your going to need to yeild time in some way. Sleep is the easiest to do. The consequencies of not calling sleep when running multi threaded is that your other threads may not run. I forget to have one of my threads sleep at all and instead it was running a tight loop to dispatch events and it slowed the UI of every program running including the debugger except for iTunes go figure.
You're absolutely correct, when threading I use sleep to make sure all my threads get the time they need. However, I was in my earlier posts assuming that this is a non-threaded app, in which case, I would almost never acutaly call sleep(). If I need to pause a game, I like to know exactly how long it will pause, not at least how long it will pause.