Skip to content

Commit ed9bc6a

Browse files
authored
Merge pull request #55 from SummerGGift/time_ticks
【修改】:utime.tick_us 显示错误的问题
2 parents 0a03d6e + 192e60c commit ed9bc6a

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)