Skip to content

Commit 2c7968e

Browse files
committed
【修改】:utime.tick_us 显示错误的问题
1 parent 0a03d6e commit 2c7968e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

port/mphalport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, uint32_t len) {
8080
}
8181

8282
mp_uint_t mp_hal_ticks_us(void) {
83-
return rt_tick_get() * 1000;
83+
return rt_tick_get() * 1000000UL / RT_TICK_PER_SECOND ;
8484
}
8585

8686
mp_uint_t mp_hal_ticks_ms(void) {

0 commit comments

Comments
 (0)