Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By lotus49
#72708 Is there any way to get accurate time on an ESP8266. By accurate, I mean correct to < 0.1 seconds.

The only obvious way to do this is using NTP. I tried using the ntp_client library written by Michael Margolis and using configtime() but both these approaches result in a time about two seconds slow.

Keeping the time is no issue but I cannot set it sufficiently accurately.
Last edited by lotus49 on Tue Dec 26, 2017 9:24 am, edited 1 time in total.
User avatar
By rudy
#72709 There has been an addition two days ago that may help. uSeconds has been included in the settimeofday() function. I don't know how this will affect getting a more accurate time but it is encouraging.

https://github.com/esp8266/Arduino/pull/4001

See the bottom of https://github.com/esp8266/Arduino/issues/1679

https://github.com/esp8266/Arduino/tree ... NTP-TZ-DST