Skip to content

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

@gibo77

Description

@gibo77

Hi,
Can you change the program that has delay (10) in waiting for NTP data and use millis() instead. So that our interrupt in the main program will not be delayed.
Thanks!

  do {
    delay ( 10 );
    cb = this->_udp->parsePacket();
    if (timeout > 100) return false; // timeout after 1000 ms
    timeout++;
  }

Activity

DaleSchultz

DaleSchultz commented on Sep 21, 2020

@DaleSchultz

I agree, this is a good suggestion.

linked a pull request that will close this issue on Jan 28, 2022
mlesniew

mlesniew commented on Jan 28, 2022

@mlesniew

Hi guys, I've prepared a fix for this in PR #163

linked a pull request that will close this issueAvoid blocking in NTPClient::update() #163on Jan 28, 2022
linked a pull request that will close this issueRe-works the update() method to avoid blocking #90on Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      delay(10) to wait for NTP data messes interrupt routines · Issue #112 · arduino-libraries/NTPClient