setCommandInterval method

void setCommandInterval(
  1. VoidCallback command,
  2. Duration interval
)

Change the interval that command runs at.

Implementation

void setCommandInterval(final VoidCallback command, final Duration interval) {
  final index = _getCommandIndex(command);
  _intervals[index] = interval;
  final oldTimer = _timers[index];
  if (oldTimer != null) {
    oldTimer.cancel();
    _startCommandTimer(command);
  }
}