add random delay

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-03-29 20:36:32 +02:00
parent b57b330d1f
commit a66e9db94c
1 changed files with 5 additions and 0 deletions

View File

@ -328,6 +328,11 @@ async function fullMarketMaker() {
onExit(client, group, mangoAccount, Array.from(marketContexts.values()));
});
// Random delay to startup
if (Math.random() >= 0.5) {
await new Promise((r) => setTimeout(r, control.interval / 2));
}
// Loop indefinitely
while (control.isRunning) {
try {