Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/redis/vendor/https/deno.land/std/async/delay.ts>delay

🦕 Redis client for Deno 🍕
Very Popular
Latest
function delay
import { delay } from "https://deno.land/x/redis@v0.32.3/vendor/https/deno.land/std/async/delay.ts";

Resolve a Promise after a given amount of milliseconds.

Examples

Example 1

import { delay } from "https://deno.land/std@0.224.0/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@0.224.0/async/delay.ts";

// ...
await delay(100, { persistent: false });
// ...

Parameters

ms: number
optional
options: DelayOptions = [UNSUPPORTED]

Returns

Promise<void>