rp2/mphalport: Optimise exit of mp_hal_delay_ms loop.

best_effort_wfe_or_timeout() already calls time_reached() and returns the
result of it, so no need to call it again.

Signed-off-by: Damien George <damien@micropython.org>
pull/12901/head
Damien George 2023-11-14 16:17:24 +11:00
rodzic fc94399ffe
commit 12ef8a5ba2
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -192,10 +192,9 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
void mp_hal_delay_ms(mp_uint_t ms) {
absolute_time_t t = make_timeout_time_ms(ms);
while (!time_reached(t)) {
do {
MICROPY_EVENT_POLL_HOOK_FAST;
best_effort_wfe_or_timeout(t);
}
} while (!best_effort_wfe_or_timeout(t));
}
void mp_hal_time_ns_set_from_rtc(void) {