|
|
@@ -63,11 +63,14 @@ uint64_t IRAM_ATTR esp_timer_impl_get_counter_reg(void)
|
|
|
return systimer_hal_get_counter_value(SYSTIMER_COUNTER_0);
|
|
|
}
|
|
|
|
|
|
-uint64_t IRAM_ATTR esp_timer_impl_get_time(void)
|
|
|
+int64_t IRAM_ATTR esp_timer_impl_get_time(void)
|
|
|
{
|
|
|
return systimer_hal_get_time(SYSTIMER_COUNTER_0);
|
|
|
}
|
|
|
|
|
|
+// Xtensa architecture doesn't have tail call optimization, using alias here can improve performance somehow
|
|
|
+int64_t esp_timer_get_time(void) __attribute__((alias("esp_timer_impl_get_time")));
|
|
|
+
|
|
|
void IRAM_ATTR esp_timer_impl_set_alarm(uint64_t timestamp)
|
|
|
{
|
|
|
portENTER_CRITICAL_SAFE(&s_time_update_lock);
|