import { delay } from "https://dotland.deno.dev/x/postgres@v0.19.0/tests/test_deps.ts";
Resolve a {@link Promise
} after a given amount of milliseconds.
Examples
Example 1
Example 1
import { delay } from "https://deno.land/std@$STD_VERSION/async/delay.ts";
// ...
const delayedPromise = delay(100);
const result = await delayedPromise;
// ...
To allow the process to continue to run as long as the timer exists.
import { delay } from "https://deno.land/std@$STD_VERSION/async/delay.ts";
// ...
await delay(100, { persistent: false });
// ...