Delay SUB

by Clippy (Login burger2227)
R

 

Another problem with SLEEP is that a key press can interrupt the delay.

DO
PRINT "Hello";
Delay .5 '<<<<<<<<<<<< any number of seconds down to .05
PRINT "World!";
LOOP UNTIL INKEY$ <> ""

END

SUB Delay (dlay!)
start! = TIMER
DO WHILE start! + dlay! >= TIMER
IF start! > TIMER THEN start! = start! - 86400
LOOP
END SUB


In QB64 _DELAY can be used to do the same thing down to .001 or one millisecond.

Posted on Jul 31, 2012, 4:24 AM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement