PaulStoffregen / Time

Time library for Arduino
http://playground.arduino.cc/code/time
1.26k stars 670 forks source link

How to disable setSyncInterval #184

Open hedva92 opened 11 months ago

hedva92 commented 11 months ago

In the manual it is described that the synchronization interval is 5 minutes. Is it possible to completely suppress this feature? I would like to do the synchronization myself. Thank you.

vatsake commented 2 weeks ago

After manually updating the time, set the callback function to 0.

setSyncProvider(getNtpTime);
setSyncProvider(0);

I think this is currently the only way. https://github.com/PaulStoffregen/Time/blob/a18e50dcea4ee17285d732d39e7bc559482d1d3d/Time.cpp#L261-L269