   webServer.handleClient();
 
   /* Restart connecting to NTP server one time in 60 sec */
-  if (!responseNTP && !apModeNow && ntpReconnectTime+60000 < millis() && WiFi.status() == WL_CONNECTED)  {
-    ntpReconnectTime = millis();
+  if (!responseNTP && !apModeNow && ntpReconnectDelay+60000 < millis() && WiFi.status() == WL_CONNECTED)  {
+    ntpReconnectDelay = millis();
     startNTP();
   }
 

  else mqttRestart = true;

  /* reconnect to mqqt broker one time in 10 sec. */
  if (mqttRestart && mqttReconnectTime+10000 < millis()) {
    if (staModeNow && WiFi.status() == WL_CONNECTED) {
      mqttClient.disconnect();
      mqttReconnect();
      printMqttState();
    }
    mqttReconnectTime = millis();
  }

  if (!offWiFi && wmConfig.apMode && !apModeNow && !staModeNow) {


_config wmConfig;

unsigned long mqttReconnectDelay = 0;
unsigned long staReconnectDelay = 0;
unsigned long ntpReconnectDelay = 0;
time_t timeStart;

/* If EXT_POWER_CONTROL is false and pin A0 should be not connected to anything */
