adaptiveSetInterval fires the first request immediately if runNow is true, in 3 seconds otherwise.

This commit is contained in:
Pēteris Caune 2020-06-01 11:51:40 +03:00
parent cfb294862f
commit 5c8b5b7b63
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2

View File

@ -40,8 +40,6 @@ function adaptiveSetInterval(fn, runNow) {
} }
}); });
if (runNow) {
quota = 20; quota = 20;
scheduleRun(); scheduledId = setTimeout(scheduleRun, runNow ? 1 : 3000);
}
} }