Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable setSyncInterval #184

Open
hedva92 opened this issue Dec 21, 2023 · 1 comment
Open

How to disable setSyncInterval #184

hedva92 opened this issue Dec 21, 2023 · 1 comment

Comments

@hedva92
Copy link

hedva92 commented Dec 21, 2023

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
Copy link

vatsake commented Nov 8, 2024

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

setSyncProvider(getNtpTime);
setSyncProvider(0);

I think this is currently the only way.

Time/Time.cpp

Lines 261 to 269 in a18e50d

if (getTimePtr != 0) {
time_t t = getTimePtr();
if (t != 0) {
setTime(t);
} else {
nextSyncTime = sysTime + syncInterval;
Status = (Status == timeNotSet) ? timeNotSet : timeNeedsSync;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants