js: add 5 ms delay to compensate from potentially slow server

This commit is contained in:
Clement Denis 2020-09-11 15:38:32 +02:00
parent 2d09cb2ca0
commit 16afd01662
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ const setIntervalSync = (fn, delay, limit = 0) => new Promise(s => {
// if the trailing edge is true it will execute the callback before returning the array
const run = async (callback, { delay, count }) => {
const arr = []
await setIntervalSync(() => callback(arr, 1), delay, count * delay)
await setIntervalSync(() => callback(arr, 1), delay, count * delay + 5)
return arr.length
}