ixfx
    Preparing search index...

    Function elapsedSince

    • Returns elapsed time since the initial call.

      // Record start
      const elapsed = elapsedSince();

      // Get elapsed time in millis
      // since Elapsed.since()
      elapsed(); // Yields number

      If you want to initialise a stopwatch, but not yet start it, consider:

      // Init
      let state = {
      clicked: Stopwatch.infinity()
      };

      state.click(); // Returns a giant value

      // Later, when click happens:
      state = { click: elapsedSince() }

      See also:

      Returns Since