NTPClient icon indicating copy to clipboard operation
NTPClient copied to clipboard

Poll interval is much to often

Open Rki009 opened this issue 2 years ago • 0 comments

https://github.com/arduino-libraries/NTPClient/blob/62fafd8eca51ebf8f5f4c7662e484caba0a4dcc1/NTPClient.h#L21

For simple embedded systems that just need to know the time +/- a second a recommended polling interval of 2^10 (1024 seconds) or longer is recommended to minimize the load on public time severs while providing accurate time. With a crystal with +/-50ppm accuracy a polling interval give +/-50 ms! This is in the range of network packet delay times for NTP itself for a typical embedded system. Very sufficient for second level accuracy. If you need better than this a $10 module can provide a pulse per second accurate time signal to an accuracy of 50 nanoseconds! There is no need for polling public time servers more often than once an hour.

unsigned long _updateInterval = (1024*1000);  // In ms, 2^10 seconds, 63 minutes

Related: https://github.com/arduino-libraries/NTPClient/issues/123

Rki009 avatar Jan 14 '23 08:01 Rki009