Sleep

sql

FUNCTION Sleep(IN tm INT) RETURNS BOOLEAN;

Parameters

tm Miliseconds count

Since version

6.1

Description

This function may be used only in the SQL language.

This function halts a routine execution until

The sleeping thread has the state equal to 9 in the client list.

Function value

If the function ends after the specified interval is over, TRUE will be returned. FALSE otherwise.

Example

Construction that guarantees periodical repeating of some action every 15 minutes:

REPEAT
 --  action repeated every 15 minutes
UNTIL NOT Sleep(15*1000*60)
END REPEAT;