StopWatch Class

A StopWatch for timing operations.

Methods

Name Description
constructor(description?: string, startImmediately: boolean = false): StopWatch ctor for StopWatch  
reset(): void Clear the StopWatch  
start(): void Start the stopwatch.  
stop(): BeDuration Stop the stopwatch so that the duration can be viewed later.  

Properties

Name Type Description
current Accessor ReadOnly BeDuration Get the elapsed time since start() on a running timer.  
currentSeconds Accessor ReadOnly number Get the elapsed time, in seconds, since start() on a running timer.  
description ConstructorProperty undefined | string optional string stored with the StopWatch  
elapsed Accessor ReadOnly BeDuration Get the elapsed time between start() and stop() on this timer.  
elapsedSeconds Accessor ReadOnly number Get the elapsed time, in seconds, between start() and stop() on this timer.  

Defined in

Last Updated: 10 September, 2019