add random delay

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-03-29 20:37:05 +02:00
parent a66e9db94c
commit c6b9c70d4d
1 changed files with 1 additions and 3 deletions

View File

@ -329,9 +329,7 @@ async function fullMarketMaker() {
});
// Random delay to startup
if (Math.random() >= 0.5) {
await new Promise((r) => setTimeout(r, control.interval / 2));
}
await new Promise((r) => setTimeout(r, control.interval / Math.random()));
// Loop indefinitely
while (control.isRunning) {