Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
EspTime.h
Go to the documentation of this file.
1
21#pragma once
22
23#include <cstdint>
24
25#include "esp_timer.h"
26
27namespace hf_time::esp32 {
28
36inline void InitMonotonic() noexcept {}
37
47inline std::uint64_t MonotonicUs() noexcept {
48 return static_cast<std::uint64_t>(::esp_timer_get_time());
49}
50
51} // namespace hf_time::esp32
Definition EspTime.h:27
void InitMonotonic() noexcept
No-op on ESP-IDF: the high-resolution timer is started by the system bootstrap before app_main runs.
Definition EspTime.h:36
std::uint64_t MonotonicUs() noexcept
Microseconds since boot from the hardware-backed timer.
Definition EspTime.h:47