dart / 2 / dart-core / stopwatch / stopwatch.html

Stopwatch constructor

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.
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/Stopwatch/Stopwatch.html