1.0.0 • Published 2 years ago

@layer92/sleep-async v1.0.0

Weekly downloads
-
License
0BSD
Repository
github
Last release
2 years ago

Asynchronous sleep function lets you wait to resume execution, without blocking the thread.

Usage

import {SleepAsync} from "sleep-async";

async function exampleAsync(){
    console.log("About to wait for 2 seconds...");
    await SleepAsync(2000);
    console.log("Approximately 2 seconds later, execution resumes...")
}

exampleAsync();
1.0.0

2 years ago