W3cubDocs

/Dart 2

start method

void start ()

Starts the Stopwatch.

The elapsed count is increasing monotonically. If the Stopwatch has been stopped, then calling start again restarts it without resetting the elapsed count.

If the Stopwatch is currently running, then calling start does nothing.

Implementation

void start() {
  if (_stop != null) {
    // (Re)start this stopwatch.
    // Don't count the time while the stopwatch has been stopped.
    _start += _now() - _stop;
    _stop = null;
  }
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Stopwatch/start.html