InstantStopwatch constructor

InstantStopwatch({
  1. int fromMS = 0,
})

Constructs the stopwatch. If you want the stopwatch to begin at a certain time, pass a millisecond amount to start at.

Implementation

InstantStopwatch({int fromMS = 0}) {
  _orig = subtract(orig: DateTime.now().toUtc(), amount: fromMS, units: 'ms');
  pause();
}