You can use the pause
function with an input argument of the number of seconds you want to wait. Here's an example code that waits for a variable number of seconds specified by the wait_time
variable:
main.m60 chars3 lines
Alternatively, you can use the timer
object to wait for a variable amount of time. Here's an example code:
main.m140 chars6 lines
This code creates a timer object that fires an event after wait_time
seconds. The wait
function is used to block the program until the timer finishes, and then the timer object is deleted.
gistlibby LogSnag