 
 
 // Delays [ms]
-#define IDLE_PAUSE    2000
-#define BLINK_DELAY    100
-#define PAUSE_DELAY   1000
-#define READ_DELAY      50
-#define IDLE_TIMEOUT (1000L * 60L)
-#define ROLLOVER_GAP (1000L * 60L * 60L)
+#define IDLE_PAUSE     2000
+#define BLINK_DELAY     100
+#define PAUSE_DELAY    1000
+#define READ_DELAY       50
+#define IDLE_TIMEOUT  (1000L * 60L)
+#define PAUSE_TIMEOUT (1000L * 60L *  5L)
+#define ROLLOVER_GAP  (1000L * 60L * 60L)
 
 // Trellis LED brightness 1..15
 #define BRIGHTNESS_SLEEPTICK  0

  // Read encoder switch
  ClickEncoder::Button button = encoder.getButton();
  if (button == ClickEncoder::Clicked) {
    if (state == PLAY_SELECTED) {
      onPause (true);
    } else if (state == PLAY_PAUSED) {
      onPause (false);
    }
  }


    trellis.blinkRate(HT16K33_BLINK_HALFHZ);
    player.pausePlaying(true);
    enableAmplifier(false);
    nextTimeoutTick = millis() + PAUSE_TIMEOUT;
    state = PLAY_PAUSED;
  } else {
    Serial.println("Resume");
    trellis.blinkRate(HT16K33_BLINK_1HZ);
    enableAmplifier(!headset);
    player.pausePlaying(false);
    nextTimeoutTick = 0; // no timeout during playing
    state = PLAY_SELECTED;
  }
}
