summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/ets_alt_task.c
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266/ets_alt_task.c')
-rw-r--r--esp8266/ets_alt_task.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/ets_alt_task.c b/esp8266/ets_alt_task.c
index 6434f23660..ff7dba1869 100644
--- a/esp8266/ets_alt_task.c
+++ b/esp8266/ets_alt_task.c
@@ -120,11 +120,13 @@ bool ets_loop_iter(void) {
}
// handle overflow of system microsecond counter
+ ets_intr_lock();
uint32_t system_time_cur = system_get_time();
if (system_time_cur < system_time_prev) {
system_time_high_word += 1; // record overflow of low 32-bits
}
system_time_prev = system_time_cur;
+ ets_intr_unlock();
//static unsigned cnt;
bool progress = false;