start method Null safety

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.


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;