Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/delayed/src/sleep.ts>sleepSync

A simple module that provide an asynchronous approach to interval, delay and timeout
Latest
function sleepSync
import { sleepSync } from "https://deno.land/x/delayed@2.1.1/src/sleep.ts";

Synchronous sleep during the specified delay.

Examples

Sync sleep

sleepSync(200)
//wait 200ms

Parameters

delay: ms
  • The amount of time to sleep in milliseconds.