Re: [AD] proposal: al_sleep()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


At 09:59 AM 3/01/2004 -0500, you wrote:
I don't see the reason why 100% CPU usage is bad.

and

I still can't think of any Allegro program where I would want to call yield_timeslice

I actually use yield_timeslice() in my app. It's a level editor, and without a yield, it eats winamp's timeslice so much that winamp fails to keep up it's rendering. So, yes, it does come into play. At least when using tools. 3dsmax for instance, only takes 100% cpu when rendering, otherwise, it plays nice with everything else.


yes, winamp is a classic example. but do you understand that yeild does not drop CPU usage to near 0% ? infact it leaves it at 100%, which burns up laptops and other "portable" devices.



One more thing, has anyone considered that having different wait times per-OS could cause problems? I mean, if you had a crossplatform networked game, and one copy waits 10ms, and one waits 25ms, couldn't that be a problem? I'm not sure. Maybe it should be noted that they don't wait the same per-OS.



they never waited at the same time.

sleep is not a "wait" thingy anyway.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/