import { sleep } from "https://deno.land/x/pita_api@0.9.1/deps.ts";
Asynchronous sleep during the specified delay.
Examples
await sleep(500)
//wait 500ms
const ac = new AbortController()
await sleep(1_000_000, ac)
//ac called elsewhere, eg: callback
ac.abort()
//abort sleep before long sleep
Parameters
optional
unnamed 1: { signal?: AbortSignal; } = [UNSUPPORTED]