Monday 30 October 2017

Best practice for multiple setInterval

Hi there! I wrote a program which collects frequent information form several places. All in all there are about 10 functions which are called using the setInterval-Function. The interval is between 10 and 300 seconds. None of them is really time-critical and every iteration is finished long before the next call, so it just works fine.But I'd like to know what's the best practice. Should I set up one setInterval with 10 seconds and check the time between the function calls or are more setInterval-Functions the way to go and why.

Submitted October 30, 2017 at 02:32PM by tasKinman

No comments:

Post a Comment