mirror of https://github.com/01-edu/public.git
js: add 5 ms delay to compensate from potentially slow server
This commit is contained in:
parent
2d09cb2ca0
commit
16afd01662
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue