Home Manual Reference Source Test Repository

Function

Static Public Summary
public

async delay(milliseconds: *): Promise

Synced setTimeout()

Static Public

public async delay(milliseconds: *): Promise source

Synced setTimeout()

Params:

NameTypeAttributeDescription
milliseconds *

{Number} - Milliseconds to sleep

Return:

Promise

Promise that given number of milliseconds passed

Example:

const Delay = Mep.require('misc/Delay');
async foo() {
 await Delay(200); // Wait 200ms
}