mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 12:53:29 +00:00
esp_timer: correct startup time
This commit is contained in:
@@ -446,9 +446,7 @@ esp_err_t esp_timer_init(void)
|
||||
}
|
||||
|
||||
#if CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER
|
||||
// [refactor-todo] this logic, "esp_rtc_get_time_us() - g_startup_time", is also
|
||||
// the weak definition of esp_system_get_time; find a way to remove this duplication.
|
||||
esp_timer_private_advance(esp_rtc_get_time_us() - g_startup_time);
|
||||
esp_timer_impl_init_system_time();
|
||||
#endif
|
||||
|
||||
return ESP_OK;
|
||||
@@ -600,17 +598,3 @@ int64_t IRAM_ATTR esp_timer_get_next_alarm(void)
|
||||
}
|
||||
return next_alarm;
|
||||
}
|
||||
|
||||
// Provides strong definition for system time functions relied upon
|
||||
// by core components.
|
||||
#if CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER
|
||||
int64_t IRAM_ATTR esp_system_get_time(void)
|
||||
{
|
||||
return esp_timer_get_time();
|
||||
}
|
||||
|
||||
uint32_t IRAM_ATTR esp_system_get_time_resolution(void)
|
||||
{
|
||||
return 1000;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user