aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/sleep.js
diff options
context:
space:
mode:
authorGravatar Justin Whear <justin.whear@gmail.com> 2023-03-02 09:00:20 -0800
committerGravatar GitHub <noreply@github.com> 2023-03-02 09:00:20 -0800
commit20930849ce0bcfe685e8042a4a53d9c9dd67343b (patch)
tree2f7eaa99dd6e273bcd0e26c2adc772f2aefc7bf1 /test/bun.js/sleep.js
parentefdf64746076c4ed09da87e41d7de81c2b659dab (diff)
downloadbun-20930849ce0bcfe685e8042a4a53d9c9dd67343b.tar.gz
bun-20930849ce0bcfe685e8042a4a53d9c9dd67343b.tar.zst
bun-20930849ce0bcfe685e8042a4a53d9c9dd67343b.zip
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
Diffstat (limited to 'test/bun.js/sleep.js')
-rw-r--r--test/bun.js/sleep.js2
1 files changed, 1 insertions, 1 deletions
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);