Skip to content
Reference > Methods

sleepMillis(millisToSleep)

Definition

Long sleepMillis(Number millisToSleep)

Description

Returns the number of millisecond slept as a Long. This is primarily used for testing. WARNING: This is a BLOCKING call.

Parameter Definition

Name Type Description
millisToSleep Number The number of milliseconds to sleep.

Examples

Long r1 = sleepMillis(0); // r1 == 0
Long r2 = sleepMillis(50); // r2 == 50