Does Node.js enforce a minimum delay for setTimeout?

前端 未结 3 1313
独厮守ぢ
独厮守ぢ 2020-12-09 01:28

In browsers, if you use setTimeout from within a function called by setTimeout then a minimum delay of 4ms will be enforced. Mozilla\'s developer w

3条回答
  •  星月不相逢
    2020-12-09 01:51

    It should be noted that timer implementation will vary by operating system. For example, I remember a "good old" JTimer issue where the resolution of the timer was 16ms on Windows, and ~1ms on other platforms. It is almost certainly worth testing on your particular server.

提交回复
热议问题