Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Avoid blocking in NTPClient::update()#163

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mlesniew wants to merge1 commit intoarduino-libraries:master
base:master
Choose a base branch
Loading
frommlesniew:master

Conversation

@mlesniew
Copy link

When a NTP request is sent, it may take several milliseconds to retrieve the response. This commit changes the NTPClient::update() behaviour to asynchronous allowing a NTP request to be sent with one update() call and handle the response when it's available in another call, eliminating active waiting.

This commit also changes the NTPClient::forceUpdate() implementation to rely on the logic in NTPClient::update(). However, the behaviour of this function does not change from the API user's perspective. It is still synchronous, it only returns when all processing is complete.

This fixes issue#112.

Note that this is equivalent to what was suggested in PR#90. I decided to reimplement it, because the other PR seems to be forgotten by the author and he still hasn't signed the CLA.

lukaszgieraltowski and AmirHmZz reacted with thumbs up emoji
When a NTP request is sent, it may take several milliseconds to retrievethe response.  This commit changes the NTPClient::update() behaviour toasynchronous allowing a NTP request to be sent with one update() calland handle the response when it's available, in another call eliminatingactive waiting.This commit also changes the NTPClient::forceUpdate() implementation torely on the logic in NTPClient::update().  However, the behaviour ofthis function does not change from the API user's perspective.  It isstill synchronous, it only returns when all processing is complete.
@CLAassistant
Copy link

CLAassistant commentedJan 28, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

Memory usage change @3f9957d

Boardflash%RAM for global variables%
esp8266:esp8266:huzzah💚 -64 - -64-0.01 - -0.01🔺 +8 - +8+0.01 - +0.01
Click for full report table
Boardexamples/Advanced
flash
%examples/Advanced
RAM for global variables
%examples/Basic
flash
%examples/Basic
RAM for global variables
%examples/IsTimeSet
flash
%examples/IsTimeSet
RAM for global variables
%
esp8266:esp8266:huzzah-64-0.0180.01-64-0.0180.01-64-0.0180.01
Click for full report CSV
Board,examples/Advanced<br>flash,%,examples/Advanced<br>RAM for global variables,%,examples/Basic<br>flash,%,examples/Basic<br>RAM for global variables,%,examples/IsTimeSet<br>flash,%,examples/IsTimeSet<br>RAM for global variables,%esp8266:esp8266:huzzah,-64,-0.01,8,0.01,-64,-0.01,8,0.01,-64,-0.01,8,0.01

@per1234per1234 linked an issueJan 28, 2022 that may beclosed by this pull request
@per1234per1234 added the topic: codeRelated to content of the project itself labelJan 28, 2022
@AmirHmZz
Copy link

Any updates on this?

@mlesniew
Copy link
Author

I believe this PR is ready to be merged, we're just waiting for one of the maintainers to accept it.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

topic: codeRelated to content of the project itself

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

delay(10) to wait for NTP data messes interrupt routines

4 participants

@mlesniew@CLAassistant@AmirHmZz@per1234

[8]ページ先頭

©2009-2025 Movatter.jp