RestartableTimer constructor

RestartableTimer(
  1. Duration _duration,
  2. ZoneCallback _callback
)

Creates a new timer.

The callback function is invoked after the given duration. Unlike a normal non-periodic Timer, callback may be called more than once.

Implementation

RestartableTimer(this._duration, this._callback)
    : _timer = Timer(_duration, _callback);