Skip to main content

Time

Time-related operations can be used to get thde current time and date or control execution flow with wait functions. These methods can be both synchronous and asynchronous and can be accessed globally.

time()

Gets the current time in milliseconds.

time(): number;

timeString()

Gets the current time as a string in the format HHMMSS.

timeString(): string;

dateString()

Gets the current date as a string in the format YYYYMMDD.

dateString(): string;

waitOn()

Holds the execution until the given condition evaluates to true.

waitOn(condition: boolean): Promise<void>;

waitOff()

Holds the execution until the given condition evaluates to false.

waitOff(condition: boolean): Promise<void>;

waitTime()

Holds the execution for a specified amount of time. The provided time should be in milliseconds.

waitTime(time: number): Promise<void>;