summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-29 19:33:35 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-29 19:35:27 +0300
commit04fa999cfe86e731d03305081e3df42e9b60508b (patch)
tree4f1e834e2983649bf90e942a089a4985ffad35cf
parentebd9f550e8e0916e1b6b86720044e402201b5a69 (diff)
downloadmicropython-04fa999cfe86e731d03305081e3df42e9b60508b.tar.gz
micropython-04fa999cfe86e731d03305081e3df42e9b60508b.zip
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.
-rw-r--r--stmhal/pyexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/pyexec.c b/stmhal/pyexec.c
index 0ab0e0ee15..f5de904228 100644
--- a/stmhal/pyexec.c
+++ b/stmhal/pyexec.c
@@ -69,7 +69,7 @@ STATIC int parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t input_ki
// execute code
mp_hal_set_interrupt_char(CHAR_CTRL_C); // allow ctrl-C to interrupt us
- start = HAL_GetTick();
+ start = mp_hal_ticks_ms();
mp_call_function_0(module_fun);
mp_hal_set_interrupt_char(-1); // disable interrupt
nlr_pop();
@@ -97,7 +97,7 @@ STATIC int parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t input_ki
// display debugging info if wanted
if ((exec_flags & EXEC_FLAG_ALLOW_DEBUGGING) && repl_display_debugging_info) {
- mp_uint_t ticks = HAL_GetTick() - start; // TODO implement a function that does this properly
+ mp_uint_t ticks = mp_hal_ticks_ms() - start; // TODO implement a function that does this properly
printf("took " UINT_FMT " ms\n", ticks);
gc_collect();
// qstr info