stop method

Future<void> stop()

Stops timers and waits for any in-flight run to finish.

Implementation

Future<void> stop() async {
  _startupTimer?.cancel();
  _startupTimer = null;
  _intervalTimer?.cancel();
  _intervalTimer = null;

  final inFlight = _runInFlight;
  if (inFlight != null) {
    await inFlight;
  }
}