updateInterval method

void updateInterval(
  1. Duration newInterval
)

Update the compaction interval.

Stops and restarts the timer with the new interval.

Implementation

void updateInterval(Duration newInterval) {
  _interval = newInterval;
  if (_isRunning) {
    stop();
    start();
  }
}