Skip to content

Commit

Permalink
in example properly wait for NTP to be set (#4000)
Browse files Browse the repository at this point in the history
fix #3905
  • Loading branch information
d-a-v authored and devyte committed Dec 21, 2017
1 parent d0a4900 commit d5bb4a9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void setup() {
Serial.print("Setting time using SNTP");
configTime(8 * 3600, 0, "pool.ntp.org", "time.nist.gov");
time_t now = time(nullptr);
while (now < 1000) {
while (now < 8 * 3600 * 2) {
delay(500);
Serial.print(".");
now = time(nullptr);
Expand Down

0 comments on commit d5bb4a9

Please sign in to comment.