systimer: optimise esp_timer_get_time

This commit is contained in:
morris
2021-04-25 19:38:01 +08:00
parent 3f7b637a15
commit 988c88a6b1
5 changed files with 17 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ int64_t IRAM_ATTR esp_timer_impl_get_time(void)
if (unlikely(s_alarm_handler == NULL)) {
return 0;
}
return systimer_hal_get_time(&systimer_hal, SYSTIMER_LL_COUNTER_CLOCK);
return systimer_hal_get_counter_value(&systimer_hal, SYSTIMER_LL_COUNTER_CLOCK) / SYSTIMER_LL_TICKS_PER_US;
}
int64_t esp_timer_get_time(void) __attribute__((alias("esp_timer_impl_get_time")));