Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
Namespaces | Functions
EspTime.h File Reference

ESP32-family implementation of the high-resolution monotonic time source consumed via HfTime.h. More...

#include <cstdint>
#include "esp_timer.h"
Include dependency graph for EspTime.h:

Go to the source code of this file.

Namespaces

namespace  hf_time
 
namespace  hf_time::esp32
 

Functions

void hf_time::esp32::InitMonotonic () noexcept
 No-op on ESP-IDF: the high-resolution timer is started by the system bootstrap before app_main runs.
 
std::uint64_t hf_time::esp32::MonotonicUs () noexcept
 Microseconds since boot from the hardware-backed timer.
 

Detailed Description

ESP32-family implementation of the high-resolution monotonic time source consumed via HfTime.h.

Backed by esp_timer_get_time(), a 64-bit µs counter driven by a dedicated hardware timer that ESP-IDF starts before app_main. The counter is monotonic for >292 000 years so wrap is not a concern.

Header-only inline implementation: every call lowers to a single esp_timer_get_time call with no extra frames so it is safe inside hot-path measurement loops (valve self-test sweeps, parallel-stress sampler, ramp settling detectors).

Do not include this file directly from middleware/app code — go through HfTime.h so MCU dispatch stays in one place.