Skip to content

Commit 04fa999

Browse files
committed
stmhal/pyexec: Use mp_hal_ticks_ms().
This file is actually port-generic and should be moved out of stmhal/ . Other ports already use it, and thus it should use mp_hal_ticks_ms() right away.
1 parent ebd9f55 commit 04fa999

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stmhal/pyexec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ STATIC int parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t input_ki
6969

7070
// execute code
7171
mp_hal_set_interrupt_char(CHAR_CTRL_C); // allow ctrl-C to interrupt us
72-
start = HAL_GetTick();
72+
start = mp_hal_ticks_ms();
7373
mp_call_function_0(module_fun);
7474
mp_hal_set_interrupt_char(-1); // disable interrupt
7575
nlr_pop();
@@ -97,7 +97,7 @@ STATIC int parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t input_ki
9797

9898
// display debugging info if wanted
9999
if ((exec_flags & EXEC_FLAG_ALLOW_DEBUGGING) && repl_display_debugging_info) {
100-
mp_uint_t ticks = HAL_GetTick() - start; // TODO implement a function that does this properly
100+
mp_uint_t ticks = mp_hal_ticks_ms() - start; // TODO implement a function that does this properly
101101
printf("took " UINT_FMT " ms\n", ticks);
102102
gc_collect();
103103
// qstr info

0 commit comments

Comments
 (0)