diff options
author | Damien George <damien.p.george@gmail.com> | 2016-09-20 14:28:17 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-09-20 14:28:17 +1000 |
commit | 34e01984368ff2c689808ef8de182d838cd96725 (patch) | |
tree | 1c11ed0ec0571d05fb654f43981a234a6b83b53a /esp8266/esp_mphal.c | |
parent | cc7c311b5eab2749bc071716eec8a06271278f01 (diff) |
esp8266: Extend system microsecond counter to 64-bits; use in ticks_ms.
So now ticks_ms can count up to the full 30 bits. Fixes issue #2412.
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r-- | esp8266/esp_mphal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c index 7c9590ab6..b0755239f 100644 --- a/esp8266/esp_mphal.c +++ b/esp8266/esp_mphal.c @@ -117,7 +117,7 @@ void mp_hal_debug_tx_strn_cooked(void *env, const char *str, uint32_t len) { } uint32_t mp_hal_ticks_ms(void) { - return system_get_time() / 1000; + return ((uint64_t)system_time_high_word << 32 | (uint64_t)system_get_time()) / 1000; } uint32_t mp_hal_ticks_us(void) { |