{
  // Operate button loop at 4Hz unless no button has been pressed in one cycle
  unsigned long now = millis();
  if (now - m_lastButtonActivity < 250)
    return;

  button_t button = m_readButton();
  if (button == BUTTON_NONE)
  {
    unsigned long dur = getTimeoutDuration();
    if (dur != 0 && now - m_lastStateChange > dur)
      button = BUTTON_TIMEOUT;