unsigned long lastRun = 0;
int count100ms = 0;
int countSeconds = 0;

void checkMillis() {
  if ( (millis() - lastRun) > 100 ) {
    lastRun = millis();
    every100ms();
  }
}

void every100ms() {
  if (count100ms < 10) count100ms++;
  else {
    count100ms = 0;
    everySecond();
  }
  checkSaveConfigTriggered();
  checkPowerLEDInput();
}

void everySecond() {
  if (countSeconds < 60) countSeconds++;
  else {
    countSeconds = 0;
    everyMinute();
  }
}

void everyMinute() {
  updateUptime();
  buildUptimeString();
  publishStatus();
  publishPCPowerState(false);
}
