import { deadline } from "https://deno.land/std@0.177.1/async/deadline.ts";
Create a promise which will be rejected with DeadlineError
when a given delay is exceeded.
NOTE: Prefer to use AbortSignal.timeout
instead for the APIs accept AbortSignal
.
Parameters
p: Promise<T>