Reference Source Test

Function

Static Public Summary
public

async delay(milliseconds: Number): Promise

Synced setTimeout()

Static Public

public async delay(milliseconds: Number): 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
}