@s-libs/js-core
    Preparing search index...

    Class Stopwatch

    Keeps track of elapsed time.

    const stopwatch = new Stopwatch();
    // do some stuff that should be included in time
    stopwatch.stop();
    // do some more stuff that should not
    stopwatch.start();
    // do more stuff that should be timed
    console.log(`important stuff took ${stopwatch}`);
    Index

    Constructors

    • Parameters

      • __namedParameters: { previouslyElapsed?: number; running?: boolean } = {}

      Returns Stopwatch

    Methods

    • Returns number

      the total number of milliseconds added to the total so far.