LoginLogin

Sleep?

Root / Programming Questions / [.]

tallesCreated:
I'm a newcome to SmileBASIC and a have a very basic question... how do I sleep/delay my program? I found nothing on the reference page: http://smilebasic.com/en/reference/

Look up WAIT and VSYNC (under the heading "Basic instructions (data operations and others)").

Ouch, I totally missed that. Thanks! By the way, what's the SmileBASIC frame rate? In other words, what value should I pass to sleep for, let's say, a second?

timers are in 60FPS so 60 is one second

You guys are fast. Thanks again!

For SLEEP, you need to do something like: REPEAT:UNTIL BUTTON() You could also use DIALOG (or whatever it's called)

DEF SLEEP:REPEAT:UNTIL BUTTON():END