ixfx
    Preparing search index...

    Function elapsedInfinity

    • Returns a function that reports an 'infinite' elapsed time. this can be useful as an initialiser for elapsedSince et al.

      // Init clicked to be an infinite time
      let clicked = elapsedInfinity();

      document.addEventListener('click', () => {
      // Now that click has happened, we can assign it properly
      clicked = Stopwatch.since();
      });

      Returns Since