We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49a9a59 commit 7793250Copy full SHA for 7793250
ports/windows/mpconfigport.h
@@ -227,12 +227,9 @@ typedef long mp_off_t;
227
#if MICROPY_ENABLE_SCHEDULER
228
// Use 1mSec sleep to make sure there is effectively a wait period:
229
// something like usleep(500) truncates and ends up calling Sleep(0).
230
-#define MICROPY_EVENT_POLL_HOOK \
231
- do { \
232
- extern void mp_handle_pending(bool); \
233
- mp_handle_pending(true); \
234
- msec_sleep(1.0); \
235
- } while (0);
+#define MICROPY_INTERNAL_WFE(TIMEOUT_MS) msec_sleep(MIN(1.0, (double)(TIMEOUT_MS)))
+#else
+#define MICROPY_INTERNAL_WFE(TIMEOUT_MS) /* No-op */
236
#endif
237
238
#ifdef __GNUC__
0 commit comments