Is there a way to get my program to wait for a certain amount of time that doesn't have the problem SLEEP does whereby if you push any key it skips the wait?
I thought about using TIMER but I was wandering if there were any other alternatives?
Edit: forget it I didn't realise there were any other parameters for "SLEEP"
feelin' sleepy
feelin' sleepy
Towels may be harmful if swallowed in large quantities.
-
- Veteran
- Posts: 399
- Joined: Wed Mar 02, 2005 9:01 pm
- Location: Nashville, Tennessee
- Contact:
I only recommend SLEEP if you want the user to be able to get out of it by pressing a key. If not, use this DELAY sub.
I added the Midnight Fix because moneo reminded me about it in an earlier topic.
Code: Select all
SUB Delay (sec!)
LET stoptime! = TIMER + sec! 'sec! is the amount of delay in seconds
WHILE TIMER <> stoptime!
IF stoptime! > 86400 THEN stoptime! = stoptime! - 86400 'Midnight fix.
WEND
END SUB
He's using freebasic.. sleep delayms, 1Patz QuickBASIC Creations wrote:I only recommend SLEEP if you want the user to be able to get out of it by pressing a key. If not, use this DELAY sub.
I added the Midnight Fix because moneo reminded me about it in an earlier topic.Code: Select all
SUB Delay (sec!) LET stoptime! = TIMER + sec! 'sec! is the amount of delay in seconds WHILE TIMER <> stoptime! IF stoptime! > 86400 THEN stoptime! = stoptime! - 86400 'Midnight fix. WEND END SUB
I have left this dump.