Enable fractional second timestamps (re-integration of #102)#146
Enable fractional second timestamps (re-integration of #102)#146tickelton wants to merge 4 commits intoarduino-libraries:masterfrom
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.
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.
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.