     digitalWrite(GREEN_LED, LOW);
     digitalWrite(RED_LED, LOW);
 
-    if (! connectWifi()) {
+    long start = micros();
+    bool conned = connectWifi();
+    printTime(start, micros(), "Wifi Connect Time");
+    
+    if (! conned) {
       Serial.println("Wifi connection error. Going to sleep.");
       signalErrorBlick();
       deepSleep(SLEEP_SECONDS);

  bool deepSleeped = true;
  system_rtc_mem_write(ESP_RTC_ADDRESS_DEEP_SLEEP_INDICATOR, &deepSleeped, 1);

  ESP.deepSleep(seconds * 1000000, WAKE_RF_DISABLED);
}

/**


/* Wifi Static configuration. It can be turned off (to obtain it from DHCP). */
#define WIFI_STATIC_CONF false
#define WIFI_STATIC_CONF_IP IPAddress(192, 168, 95, 5)
#define WIFI_STATIC_CONF_DNS IPAddress(192, 168, 95, 254)
#define WIFI_STATIC_CONF_GW IPAddress(192, 168, 95, 254)

