Re: Switch-Case inputs December 16, 2008 07:32AM | Admin Registered: 16 years ago Posts: 271 |
Re: Switch-Case inputs December 16, 2008 07:34AM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 16, 2008 08:02AM | Registered: 16 years ago Posts: 138 |
sleep() or usleep() is a better method though unless you need a very small delay (e.g. when interfacing with hardware that wants precise timing), as it lets the CPU idle, whereas your method pegs it at 100% usage. Less CPU usage means less heat, and is even more important on handhelds where it means longer battery life, and on multithreaded systems where it means the whole system isn't slowed down to a ridiculous extent.Quote
ArikadoFunny, I've gotten it work in some of my past games. Usually 150 ends up being some insane number though, but it definitely works.Quote
Tantric
That won't work at all. If you want to "slow down" you can try sleep() or usleep(). But this still wouldn't help you with what you're trying to do.
Re: Switch-Case inputs December 16, 2008 09:00AM | Registered: 16 years ago Posts: 37 |
Re: Switch-Case inputs December 16, 2008 02:34PM | Registered: 16 years ago Posts: 1,012 |