wait

wait(  duration )

Waits for the given number of milliseconds.

There is no difference between using the wait function and the wait expression.

Arguments

duration

- The number of milliseconds to wait (and do nothing).

This argument is optional, and if not supplied will default to 10 milliseconds.

Returns

The duration that the function waited.

Example

Prints one hundred random numbers to the Application messages window.

wait( 10ms )

print(“Waited for 10ms”)


wait( 5sec )

print(“Waited for 5 seconds”)


wait( 1min)

print(“Waited for 1 minute”)


wait( 10:10pm )

print(“Waited until 10:10pm”)