FakeStopwatch class

A Stopwatch implementation that gets the current time in microseconds via a user-supplied function.

Implemented types

Constructors

FakeStopwatch(int now(), int frequency)

Properties

elapsed Duration
The elapsedTicks counter converted to a Duration.
no setteroverride
elapsedMicroseconds int
The elapsedTicks counter converted to microseconds.
no setteroverride
elapsedMilliseconds int
The elapsedTicks counter converted to milliseconds.
no setteroverride
elapsedTicks int
The elapsed number of clock ticks since calling start while the Stopwatch is running.
no setteroverride
frequency int
Frequency of the elapsed counter in Hz.
getter/setter pairoverride-getter
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Whether the Stopwatch is currently running.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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