Stopwatch constructor Null safety

Stopwatch()

Creates a Stopwatch in stopped state with a zero elapsed count.

The following example shows how to start a Stopwatch immediately after allocation.

final stopwatch = Stopwatch()..start();

Implementation

Stopwatch() {
  _frequency; // Ensures initialization before using any method.
}