extendTimer method

void extendTimer(
  1. int additionalTime
)

Implementation

void extendTimer(int additionalTime) {
  timeRemaining.value += additionalTime; // Extend the timer by the provided duration
  if (!_timer.isActive) {
    pollTimer(); // Restart the timer if it was already canceled
  }
}