-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable fractional second timestamps (re-integration of #102) #146
base: master
Are you sure you want to change the base?
Enable fractional second timestamps (re-integration of #102) #146
Conversation
* Rebases WhymustIhaveaname:master to arduino-libraries:master. * Fixes issues with Spell Check action. * Fixes HiRes example compilation. * Refactors HiRes example to be more idiomatic as compared to the existing examples. * Fixes several line ending and white space inconsistencies.
Memory usage change @ e4d04dd
Click for full report table
Click for full report CSV
|
Hi, any progress on merging this? |
@chudsaviet I haven't received any feedback on this PR, and frankly by now I no longer have any use for it because I implemented an NTP client for the project I was working on from scratch to address this and a couple of other requirements I had that the NTPClient project seemed reluctant to address. |
@tickelton , would you mind if I take this commit over and make it production-ready? |
@chudsaviet you are welcome to do so. |
return this->forceUpdate(); | ||
int8_t NTPClient::update() { | ||
uint32_t now=millis(); | ||
if(now>=this->_lastUpdate){ //if not overflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you need this logic. millis() - this->_lastUpdate
should always give a positive integer by the power of integer arithmetic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
millis() rollover (depending on mcu) every ~49 days
Since PR #102 seems inactive this rebases the changes from that PR to master and fixes the remaining CI issues.
Description of the original PR:
In addition this PR fixes some spelling and white space issues of the original PR and refactors the new example to look more idiomatic as compared to the existing examples.
CI passes and I compiled all examples for NodeMCU and tested on actual hardware.