Back to top
Documentation SurrealQL Statements SLEEP statement

SLEEP statement

The SLEEP statement is used to introduce a delay or pause in the execution of a query or a batch of queries for a specific amount of time.

Statement syntax

SLEEP @duration;

Example usage

The following query shows example usage of this statement.

-- Sleep one second
-- Sleep 100 milliseconds
SLEEP 100ms;

See also

Alternatively you may want to use the sleep function.