Theblockbuster1/disboard-auto-bump

Use date timestamp rather than a counter to calculate time remaining

Opened this issue · 0 comments

Example:

      let timer = setInterval(function() {
          var delta = Date.now() - start; // milliseconds elapsed since start
          if (delta >= timeToReach) {
            clearInterval(timer);
          }
      }, 100);