[loop] wait [someOtherCode] ' blah ' blah ' blah goto [loop]
|
|
|
[loop] calldll #kernel32, "Sleep", 1 as long, r as long scan goto [loop]
|
|
print "let's wait while looping" for x = 1 to 10 print "Now at "; x;". Waiting..."; call waitMilliseconds 1000 print "done waiting!" next x end sub waitMilliseconds ms timer ms, [stopWaiting] wait [stopWaiting] timer 0 end sub
|
start = time$("ms") timer 1, [pause] wait [pause] finish = time$("ms") timer 0 print "Delay was "; finish-start; " milliseconds" end
calldll #kernel32, "Sleep", 0 as long, r as long
' replacement for WAIT [loop] calldll #kernel32, "Sleep", 1 as long, r as long scan goto [loop]