Skip to content

setTimeoutAsync

Delays execution for a specified number of milliseconds.

Import:

import { setTimeoutAsync } from 'obsidian-dev-utils/async';

Signature:

function setTimeoutAsync(delay: number | undefined): Promise<void>

Parameters:

ParameterTypeDescription
delaynumber | undefinedThe time to wait in milliseconds.

Returns: Promise<void> — A Promise that resolves after the specified delay.