Qbasicnews.com

Full Version: WAIT COMMAND
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you get the program to wait a certain amount of time before continuing??

Tom!
where N is an integer number of seconds, is one way.
Code:
t# = TIMER
WHILE TIMER - t# < seconds: WEND
WAIT is not used for direct timing, however you can time your program using VSync Smile

Code:
SUB WaitVsync (Times AS INTEGER)
   FOR I = 1 TO Times
      WAIT &H3DA, 8
      WAIT &H3DA, 8, 8
   NEXT I
END SUB

There go 60 vsyncs in one second, so...