Delay()

Delay()

Description

Pauses code for the provided amount of time, by arg in [ms] (milliseconds). The minimum delay is 10ms.

Syntax

Delay(arg);

Parameters

Variable

Input

Variable

Input

arg

time in milliseconds between 10ms and 60000ms.

Returns

Return value

Return explanation

SCRIPT_OPERATION_SUCCESS

Successful delay execution.

SCRIPT_PARAM_INVALID

Invalid parameters. This error indicates that the argument is out of range.

Function call example

Delay example
main() { for(;;) { Delay(1000); // 1 second delay Delay(10000); // 10 second delay Delay(60000); // 60 second delay } }

Notes and Warnings

Do not use Delay inside any callback. Try to keep the delay value as low as possible.