Hierarchy

  • default

Implements

Constructors

Accessors

  • get currentLap(): TimeSpan
  • The current lap time.

    Returns

    Returns TimeSpan

  • get currentLapMilliseconds(): number
  • The number of milliseconds elapsed for current lap.

    Returns

    Returns number

  • get elapsed(): TimeSpan
  • The number of time elapsed while this Stopwatch is/was running.

    Returns

    Returns TimeSpan

  • get elapsedMilliseconds(): number
  • The number of milliseconds elapsed while this Stopwatch is/was running.

    Returns

    Returns number

  • get isRunning(): boolean
  • Returns true if the Stopwatch is currently active.

    Returns

    Returns boolean

Methods

  • Marks the new lap time and returns the the elapsed time since the last lap (or start). Has no effect if the Stopwatch is stopped.

    Returns

    Returns TimeSpan

  • Starts this Stopwatch. If previously stopped but not reset, acts like resume.

    Returns void

  • Stops this Stopwatch. Can then be restarted. Elapsed time is cumulative.

    Returns void

  • Same as Date.now()

    Returns

    Returns number

  • Measures the amount of time the closure takes before completion.

    Returns

    Parameters

    • closure: (() => void)
        • (): void
        • Returns void

    Returns TimeSpan

Generated using TypeDoc