You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are multiple timers, hardware and software that can be used in multiple configurations on the ESP32. Some have edge cases, like xtensa_lx::timer::get_cycle_count() that overflows after a certain time, or Systimer that overflows too on certain targets.
There should be a unified public API that allows reliably fetching the current uptime of the board, no matter the timer(s) configurations. It could also implement traits from Fugit to get the uptime in multiple formats, such as Duration (ms, seconds, etc), and count (total cycle count).
I also would like to see something like this, so thanks for opening this issue. I'm pretty swamped currently, but I will see if I can find somebody to look into this in the next couple weeks.
Currently, there are multiple timers, hardware and software that can be used in multiple configurations on the ESP32. Some have edge cases, like
xtensa_lx::timer::get_cycle_count()
that overflows after a certain time, or Systimer that overflows too on certain targets.There should be a unified public API that allows reliably fetching the current uptime of the board, no matter the timer(s) configurations. It could also implement traits from
Fugit
to get the uptime in multiple formats, such as Duration (ms, seconds, etc), and count (total cycle count).See also: https://github.com/esp-rs/esp-wifi/blob/e8042d54b63c4807b3c66b5d8923e38d9eae6d8e/esp-wifi/src/lib.rs#L83-L86
The text was updated successfully, but these errors were encountered: