A question about the sleep() function
-
While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?
-
While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?
Only if it's in another thread.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
While the sleep() function is executed, can another method in the same program run? If not, how can I make 1 method run while the other is delayed?
You can use Timer for the function where you have used sleep() function. It is more easier than using thread.
Anurag Gandhi. http://www.softgandhi.co.nr