NTPClient
NTPClient copied to clipboard
Add packet validity checks
Addresses #133. Improves upon #28 (not merged).
Memory usage change @ cb073babecbc55eb10100a87824e339a5ce5db4e
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
esp8266:esp8266:huzzah | :small_red_triangle: +112 - +112 | +0.01 - +0.01 | 0 - 0 | 0.0 - 0.0 |
Click for full report table
Board | examples/Advanced flash |
% | examples/Advanced RAM for global variables |
% | examples/Basic flash |
% | examples/Basic RAM for global variables |
% |
---|---|---|---|---|---|---|---|---|
esp8266:esp8266:huzzah | 112 | 0.01 | 0 | 0.0 | 112 | 0.01 | 0 | 0.0 |
Click for full report CSV
Board,examples/Advanced<br>flash,%,examples/Advanced<br>RAM for global variables,%,examples/Basic<br>flash,%,examples/Basic<br>RAM for global variables,%
esp8266:esp8266:huzzah,112,0.01,0,0.0,112,0.01,0,0.0
I added a check of the fractional part of the reference time, since per RFC4330,
There will exist a 232-picosecond interval, henceforth ignored, every 136 years when the 64-bit field will be 0, which by convention is interpreted as an invalid or unavailable timestamp.
This time does roll over, so it can hit zero again. The reference time isn't updated frequently - it's not always getting updated in subsequent queries like the other timestamps - so this force push covers a very rare but still conceivable corner case (vs the previous revision).
Marked as draft because I'm getting some NTP version 3 responses, which this was rejecting.
Memory usage change @ 38a7dffd324d3695b334ddc59cbaa8680b124ee0
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
esp8266:esp8266:huzzah | :small_red_triangle: +160 - +160 | +0.02 - +0.02 | 0 - 0 | 0.0 - 0.0 |
Click for full report table
Board | examples/Advanced flash |
% | examples/Advanced RAM for global variables |
% | examples/Basic flash |
% | examples/Basic RAM for global variables |
% |
---|---|---|---|---|---|---|---|---|
esp8266:esp8266:huzzah | 160 | 0.02 | 0 | 0.0 | 160 | 0.02 | 0 | 0.0 |
Click for full report CSV
Board,examples/Advanced<br>flash,%,examples/Advanced<br>RAM for global variables,%,examples/Basic<br>flash,%,examples/Basic<br>RAM for global variables,%
esp8266:esp8266:huzzah,160,0.02,0,0.0,160,0.02,0,0.0