Class: StopWatch

StopWatch(clockopt)

A simple stop watch.

Constructor

new StopWatch(clockopt)

Creates a new stop watch.

Parameters:
Name Type Attributes Default Description
clock Clock <optional>
Clock.system()

The clock to use for time measurement.

Classes

StopWatch

Methods

getTotalTimeMillis() → {number}

Gets the total time in milliseconds.

Returns:

The total time in milliseconds.

Type
number

getTotalTimeSeconds() → {number}

Gets the total time in seconds.

Returns:

The total time in seconds.

Type
number

start()

Starts an unnamed task.

stop()

Stops the current task.