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.
read-only, override
- elapsedMicroseconds → int
-
The elapsedTicks counter converted to microseconds.
read-only, override
- elapsedMilliseconds → int
-
The elapsedTicks counter converted to milliseconds.
read-only, override
- elapsedTicks → int
-
The elapsed number of clock ticks since calling start while the
Stopwatch is running. [...]
read-only, override
- frequency ↔ int
-
Frequency of the elapsed counter in Hz.
read / write, override-getter
- isRunning → bool
-
Whether the Stopwatch is currently running.
read-only, override
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
reset(
) → void -
Resets the elapsed count to zero. [...]
override
-
start(
) → void -
Starts the Stopwatch. [...]
override
-
stop(
) → void -
Stops the Stopwatch. [...]
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited