pause method

void pause()

Implementation

void pause() {
  isRunning = false;
  timer?.cancel();
}