Skip to content

Commit

Permalink
Uptime only needs second resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
steadramon committed Feb 10, 2024
1 parent 7c9f2c9 commit 2781154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/default/ESPNtpClient/src/ESPNtpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class NTPClient {
* @return Uptime
*/
time_t getUptime () {
uptime = uptime + (::millis () - uptime);
return uptime / 1000;
uptime = uptime + ((::millis ()/1000) - uptime);
return uptime;
}

/**
Expand Down

0 comments on commit 2781154

Please sign in to comment.