Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/async/deadline.ts>deadline

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function deadline
import { deadline } from "https://deno.land/std@0.131.0/async/deadline.ts";

Create a promise which will be rejected with DeadlineError when a given delay is exceeded.

Parameters

p: Promise<T>
delay: number

Returns

Promise<T>