Stopwatch class Null safety

A simple stopwatch interface to measure elapsed time.

Constructors

Stopwatch()
Creates a Stopwatch in stopped state with a zero elapsed count. [...]

Properties

elapsed Duration
The elapsedTicks counter converted to a Duration.
read-only
elapsedMicroseconds int
The elapsedTicks counter converted to microseconds.
read-only
elapsedMilliseconds int
The elapsedTicks counter converted to milliseconds.
read-only
elapsedTicks int
The elapsed number of clock ticks since calling start while the Stopwatch is running. [...]
read-only
frequency int
Frequency of the elapsed counter in Hz.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isRunning bool
Whether the Stopwatch is currently running.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reset() → void
Resets the elapsed count to zero. [...]
start() → void
Starts the Stopwatch. [...]
stop() → void
Stops the Stopwatch. [...]
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited