start method

  1. @override
void start()
override

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

@override
void start() {
  if (isRunning) return;
  if (_start == null) {
    _start = _now();
  } else {
    _start = _now() - (_stop! - _start!);
    _stop = null;
  }
}