ESPNtpClient icon indicating copy to clipboard operation
ESPNtpClient copied to clipboard

Basic Demo - suggested update

Open tfcroft4 opened this issue 2 years ago • 1 comments

In the basic demo there is a millisecond drift in the output. I think changing the code like so gives output every 1000ms rather than 1001ms

void loop() {
    static int last = 0;

    if ((millis () - last) **>=** SHOW_TIME_PERIOD) {
        last = millis ();
        Serial.println (NTP.getTimeDateStringUs ());
    }
}

tfcroft4 avatar Nov 14 '23 21:11 tfcroft4

Hi, thank you for reporting. That's true. I'll fix it now

gmag11 avatar Nov 15 '23 06:11 gmag11