Skip to content

Home > @jview/utils > sleep

sleep() function

睡眠等待

Signature:

typescript
export declare function sleep(seconds?: number): Promise<void>;
export declare function sleep(seconds?: number): Promise<void>;

Parameters

ParameterTypeDescription
secondsnumber(Optional) 等待时间,单位为秒

Returns:

Promise<void>