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

Added processing of fractional time, setting of currentEpoch, sanity checking of received timestamps, and new example. #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

afdp777
Copy link

@afdp777 afdp777 commented Jun 9, 2021

Hello! I humbly present my contribution to the NTPClient library.
I've tried not to change much of the way the library works and aimed to improve on it instead.
Here are the changes that I made:

Added processing of fractional time in forceUpdate() to allow syncing to the exact NTP time.
Added sanity checking of received timestamp before using it.
Added millis() rollover protection in getEpochTime().
Added new function, setEpochTime(), to set NTPClient's internal currentEpoch from hardware RTC time.
Changed the default updateInterval to 1 hour.
Added 'Advanced_with_RTC' example to demonstrate new capabilities and accuracy.

Sincerely,
afdp777

… to the exact NTP time.

Added sanity checking of received timestamp before using it.
Added millis() rollover protection in getEpochTime().
Added new function, setEpochTime(), to set NTPClient's internal currentEpoch from hardware RTC time.
Changed the default updateInterval to 1 hour.
Added 'Advanced_with_RTC' example to demonstrate new capabilities and accuracy.
@CLAassistant
Copy link

CLAassistant commented Jun 9, 2021

CLA assistant check
All committers have signed the CLA.

@chudsaviet
Copy link

chudsaviet commented Sep 26, 2021

I have couple of points:

  1. It conflicts with Enable fractional second timestamps (re-integration of #102) #146 . I have no problems if you complete this PR instead of the latter. We just need fractional time support.
  2. I think this PR shall be split into several. Basically, each point of this PR shall be separate PR.
  3. All CI tests shall be successful.

Copy link

@JefersonDeLeon JefersonDeLeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working and accurate

@per1234 per1234 linked an issue Jun 23, 2024 that may be closed by this pull request
@per1234 per1234 added type: imperfection Perceived defect in any part of project type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An 0.5s System Error
5 participants