# JS 如何实现一个同步的 sleep 函数

Issue

欢迎在 Issue 中交流与讨论: Issue 429 (opens new window)

const sleep = ms => Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds)
Last Updated: 1/17/2021, 2:02:56 PM