function countDown() {
  // Out of time
  if (counter<=0) {
    if(timerMode === 'active'){
      timerMode = 'rest';
      startTimer();
      return;
    }
    else{
      --setsRemaining;
      if (setsRemaining === 0){
        clearInterval(counterInterval);
        counterInterval = undefined;
        //setWatch(startTimer, (process.env.HWVERSION==2) ? BTN1 : BTN2);
        outOfTime();
        return;
      }
      timerMode = 'active';
      startTimer();
      return;
    }
  }

  timerLayout.clear(timerLayout.time);
  timerLayout.time.label = counter;
  timerLayout.render();
  counter--;
}
/** Function called by the counterInterval at each second.
  Updates the timer display values.
*/
Function called by the counterInterval at each second.
Updates the timer display values.
Function called by the counterInterval at each second . Updates the timer display values .
function countDown() {
  if (counter<=0) {
    if(timerMode === 'active'){
      timerMode = 'rest';
      startTimer();
      return;
    }
    else{
      --setsRemaining;
      if (setsRemaining === 0){
        clearInterval(counterInterval);
        counterInterval = undefined;
        outOfTime();
        return;
      }
      timerMode = 'active';
      startTimer();
      return;
    }
  }
  timerLayout.clear(timerLayout.time);
  timerLayout.time.label = counter;
  timerLayout.render();
  counter--;
}
function countDown ( ) { if ( counter <= 0 ) { if ( timerMode === 'active' ) { timerMode = 'rest' ; startTimer ( ) ; return ; } else { -- setsRemaining ; if ( setsRemaining === 0 ) { clearInterval ( counterInterval ) ; counterInterval = undefined ; outOfTime ( ) ; return ; } timerMode = 'active' ; startTimer ( ) ; return ; } } timerLayout . clear ( timerLayout . time ) ; timerLayout . time . label = counter ; timerLayout . render ( ) ; counter -- ; }
Function called by the counterInterval at each second.
Function called by the counterInterval at each second .
// Out of time //setWatch(startTimer, (process.env.HWVERSION==2) ? BTN1 : BTN2);