From 943b0980c7ff97cb6096291efa5e3d5dbfe10805 Mon Sep 17 00:00:00 2001 From: William Perron Date: Thu, 15 Oct 2020 21:06:31 -0400 Subject: feat(cli/ops): add the sleep_sync op (#7974) --- cli/dts/lib.deno.unstable.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cli/dts/lib.deno.unstable.d.ts') diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 2dcd94f75..4269d4b74 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -1312,6 +1312,17 @@ declare namespace Deno { atime: number | Date, mtime: number | Date, ): Promise; + + /** *UNSTABLE**: new API, yet to be vetted. + * + * SleepSync puts the main thread to sleep synchronously for a given amount of + * time in milliseconds. + * + * ```ts + * Deno.sleepSync(10); + * ``` + */ + export function sleepSync(millis: number): Promise; } declare function fetch( -- cgit v1.2.3