L
L
Leel Usama2020-10-05 06:55:35
Node.js
Leel Usama, 2020-10-05 06:55:35

Is there a difference in system load using setInterval c 0ms or 1000ms?

Is there a difference in the load on the system if you run a Node-js script with the setInterval function at an interval of 0ms or any other interval?
setInterval(() => {}, 0);
setInterval(() => {}, 1000);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hzzzzl, 2020-10-05
@leelusama

depending on what happens there, if you access the database, then of course there will be a load, and so ..... you can measure of course, but I think from one interval there will not be much difference

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question