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 47425f2 commit 6a76e15Copy full SHA for 6a76e15
shared-module/time/__init__.c
@@ -28,6 +28,7 @@
28
#include "supervisor/port.h"
29
#include "supervisor/shared/tick.h"
30
#include "py/obj.h"
31
+#include "py/nlr.h"
32
#include "py/mpstate.h"
33
34
uint64_t common_hal_time_monotonic(void) {
@@ -47,6 +48,7 @@ void common_hal_time_delay_ms(uint32_t delay) {
47
48
// if the delay was cut short by a CTRL-C then clear the keyboard exception
49
if(MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)))
50
{
- MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
51
+ MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
52
+ nlr_raise(mp_obj_new_exception(&mp_type_KeyboardInterrupt));
53
}
54
0 commit comments