MCPcopy Create free account
hub / github.com/6dylan6/jdpro / wait

Method wait

function/magic.js:357–367  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

355 }
356
357 async wait(min, max) {
358 if (min < 0) {
359 return;
360 }
361 if (max) {
362 return new Promise(
363 (resolve) => setTimeout(resolve, this.random(min, max)));
364 } else {
365 return new Promise((resolve) => setTimeout(resolve, min));
366 }
367 }
368
369 putMsg(msg) {
370 msg += ''

Callers 3

runMethod · 0.95
countdownMethod · 0.95
sendMessageMethod · 0.45

Calls 1

randomMethod · 0.95

Tested by

no test coverage detected