start method

void start()

Starts the Stopwatch.

The elapsed count increases 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() {
  int? stop = _stop;
  if (stop != null) {
    // (Re)start this stopwatch.
    // Don't count the time while the stopwatch has been stopped.
    _start += _now() - stop;
    _stop = null;
  }
}