summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/windows/windows_mphal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/windows/windows_mphal.c b/ports/windows/windows_mphal.c
index f88491707..dcee20784 100644
--- a/ports/windows/windows_mphal.c
+++ b/ports/windows/windows_mphal.c
@@ -279,10 +279,10 @@ int usleep(__int64 usec) {
#endif
void mp_hal_delay_ms(mp_uint_t ms) {
- #ifdef MICROPY_EVENT_POLL_HOOK
+ #if MICROPY_ENABLE_SCHEDULER
mp_uint_t start = mp_hal_ticks_ms();
while (mp_hal_ticks_ms() - start < ms) {
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_ms(1);
}
#else
msec_sleep((double)ms);