TimeDelay

Pauses execution for a specified amount of time.

Syntax:

TimeDelay(seconds)

Parameters:

(f) seconds seconds to delay .

Returns:

(i) always 1.

 

This function causes the currently-executing WIL program to be suspended for the specified period of time.

Seconds can be a floating point number: TimeDelay(2.5).

TimeDelay works in 100 nanosecond intervals but is only good to somewhere around 10 (.010) or 20 (.020) thousandths of a second depending on your system. Smaller intervals become insignificant compared to the overhead of calling the function.

Note: You can specify a negative number for "seconds", in which case the negative number will be treated exactly the same as a positive number.

 

Example:


Message("Wait", "About 15 seconds")
TimeDelay(15)
Message("Hi", "I'm Baaaaaaack")
See Also:

TimeWait, Yield