node.js: setInterval() skipping calls

前端 未结 4 601
一向
一向 2021-02-04 11:37

For an upcoming project with node.js I need to perform various housekeeping tasks at periodic times. Specifically some tasks every millisecond, others every 20 ms (50 times per

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-04 12:12

    SetInterval functions in javascript are not accurate. You should try to use a high resolution timer.Building accurate Timers in javascript

提交回复
热议问题