node.js setTimeout resolution is very low and unstable
I got a problem with resolution of setTimeout. When I set it to 50 ms, it
varies from 51 to even 80 ms. When I use sleep module, I am able to get
resolution like 50 µs, so what is the setTimeout function problem to get
at least 1 ms? Is there any way to fix/avoid that? The problem with sleep
is that it delays everything even when callback function should be shoot,
it waits... Is there an alternative solution to shoot some events in delay
of exactly 50 ms?
No comments:
Post a Comment