From 20930849ce0bcfe685e8042a4a53d9c9dd67343b Mon Sep 17 00:00:00 2001 From: Justin Whear Date: Thu, 2 Mar 2023 09:00:20 -0800 Subject: Fix `Bun.sleepSync` to actually use milliseconds (#2242) * Fix Bun.sleep/sleepSync to actually use milliseconds `Bun.sleepSync` was accidentally treating its argument as seconds rather than milliseconds as the docs stated. This is a breaking change in that the function now behaves as documented. Fixed relevant tests. * sleepSync: add more argument checking, tests --- test/bun.js/sleep.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/bun.js/sleep.js') diff --git a/test/bun.js/sleep.js b/test/bun.js/sleep.js index 080597424..1ec79e79d 100644 --- a/test/bun.js/sleep.js +++ b/test/bun.js/sleep.js @@ -1,4 +1,4 @@ -const interval = 0.01; +const interval = 10; const now = performance.now(); console.time("Slept"); Bun.sleepSync(interval); -- cgit v1.2.3