function sleep
thefrontside/effectionfunction sleep(duration: number): Operation<void>
Sleep for the given amount of milliseconds.
Examples
Example 1
import { main, sleep } from 'effection';
await main(function*() {
yield* sleep(2000);
console.log("Hello lazy world!");
});
Parameters
duration: number
- the number of milliseconds to sleep
Return Type
https://effection-www-pggsafb7y58a.deno.dev/api/v3/Operation<void>