const o = (e, t = 10, n = 3e4) => {
  if (e())
    return new Promise((r, s) => {
      const i = setTimeout(() => {
        clearInterval(l), s("Condition is no resolve: timeout");
      }, n), l = setInterval(() => {
        e() || (clearTimeout(i), clearInterval(l), r());
      }, t);
    });
}, a = (e) => new Promise((t) => {
  setTimeout(() => {
    t();
  }, e);
}), m = (e, t = 300, n = 10) => {
  if (e())
    return new Promise((r) => {
      const s = setTimeout(() => {
        clearInterval(i), r();
      }, t), i = setInterval(() => {
        e() || (clearTimeout(s), clearInterval(i), r());
      }, n);
    });
};
export {
  a as sleep,
  m as sleepWhile,
  o as waitWhile
};
//# sourceMappingURL=system.js.map
