Is there a way to make the function the same as setInterval, but the wait time will be the same every time. In setInterval, the timeout varies depending on the specified timeout, a little more, a little less, but very rarely, just like that.
For instance:
var before = new Date().getTime(); setInterval(function() { var after = new Date().getTime(); newTab.window.location=someURL; console.log((after - before)); before = after; }, 50000);
prints 50000.50002, 50005, 50994, 50997, 49999, 50003, 49998, etc. I want to always print 50,000
source share