-
• #2
Thanks - I'll change the documentation. I vaguely remember changing it - the reasoning was that if you made a really long interval, it got difficult to change it to anything shorter.
If you want the old behaviour it's easy enough to fake:
var interval = setInterval( function() { if (newInterval) { changeInterval(interval, newInterval); newInterval = undefined; } // ... , 1000 ); var newInterval = 1000;
-
• #3
What ever it is: at the begin or end of the interval that is setup, it should be the same as in the browser world... if* ES specifies it...
For the timeouts Iused so fare it was at the end of the interval... so I had to invoke the function once and then start the interval on it to get the desired immediate action and it's repetition after every n time entities. With a dependency on the interval length that would screw up this logic...
-
• #4
Well, as far as I know browsers don't have a
changeInterval
so compliance probably isn't a big problem in this case. -
• #5
Sorry, was not precise enough: I was only talking about
setInterval()
.
changeInterval updates immediately instead of at next timeout event as specified in documentation.
It may be related to long times (i.e. minutes) but it's hard to debug short intervals with this example.
The example below includes the console log from a run appended at the bottom.
1 Attachment