mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
esp_timer: return signed timestamp (int64_t)
Since timestamps are 64-bit, loosing one bit of range due to sign does not present an issue, however for applications doing calculations on timestamps, signed return type is more convenient.
This commit is contained in:
@@ -443,7 +443,7 @@ esp_err_t esp_timer_dump(FILE* stream)
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
uint64_t IRAM_ATTR esp_timer_get_time()
|
||||
int64_t IRAM_ATTR esp_timer_get_time()
|
||||
{
|
||||
return esp_timer_impl_get_time();
|
||||
return (int64_t) esp_timer_impl_get_time();
|
||||
}
|
||||
|
Reference in New Issue
Block a user