I have been trying to figure out how ESP32 Built in "time.h" library Syncs with NTP. Mainly I am trying to figure out the interval at which it syncs. I have seen some forums state that the getLocalTime function sends an NTP request. I don't know if that is the case. the way I currently understand it is the following:
configTime called in the setup loop syncs time with NTP server.
getLocalTime function reads the internally kept Time.
"behind the scenes" the ESP32 library periodically synchronizes with NTP Server.
Is this understanding correct?
If so, how often does the ESP32 sync it's time. If it does not sync it's time, what function do I need to use to sync it every couple days?
If the getLocalTime function is making an NTP request on every call, How do I stop that so that I don't do that every 10 ms or whatever my sample time is set to? Seems that would not be good practice to make an NTP request every 10mS but I need to get a fast update time in my script.