Skip to content

Commit 1ebdfac

Browse files
committed
Simplify WiFiClass::getTime()
based on @drp0’s suggestion
1 parent 4da038c commit 1ebdfac

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/WiFi.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ uint32_t WiFiClass::getTime()
995995
m2m_wifi_handle_events(NULL);
996996
}
997997

998-
time_t t = -1;
998+
time_t t = 0;
999999

10001000
if (_resolve == 0 && systemTime.u16Year > 0) {
10011001
struct tm tm;
@@ -1013,10 +1013,6 @@ uint32_t WiFiClass::getTime()
10131013

10141014
_resolve = 0;
10151015

1016-
if (t == (time_t)-1) {
1017-
t = 0;
1018-
}
1019-
10201016
return t;
10211017
#endif
10221018
}

0 commit comments

Comments
 (0)