From 1c8bcf6cb27439accc54b42797de7ed9ddd6d979 Mon Sep 17 00:00:00 2001 From: Juppit Date: Fri, 13 Oct 2017 12:44:18 +0200 Subject: [PATCH] fix gettimeofday() tp->tv_usec = micros() not micros() * 1000 --- cores/esp8266/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp8266/time.c b/cores/esp8266/time.c index a1866c2cf..1c2fc719a 100644 --- a/cores/esp8266/time.c +++ b/cores/esp8266/time.c @@ -101,7 +101,7 @@ int _gettimeofday_r(struct _reent* unused, struct timeval *tp, void *tzp) { ensureBootTimeIsSet(); tp->tv_sec = s_bootTime + millis() / 1000; - tp->tv_usec = micros() * 1000; + tp->tv_usec = micros(); } return 0; }