Skip to content

Commit

Permalink
This was not uptime but first time sync
Browse files Browse the repository at this point in the history
So, there is no need to substract anything
  • Loading branch information
gmag11 committed May 1, 2017
1 parent c538062 commit 0c887e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ESPNTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ time_t NTPClient::getTime()
getFirstSync();
_lastSyncd = secsSince1970;
if (!_firstSync) { // first sync is not set
_firstSync = secsSince1970 - getUptime();
_firstSync = secsSince1970;
DEBUGLOG("First sync! %s\r\n", getTimeDateString(getFirstSync()).c_str());
}
DEBUGLOG("Succeccful NTP sync at %s\r\n", getTimeDateString(getLastNTPSync()).c_str());
Expand Down

0 comments on commit 0c887e8

Please sign in to comment.