21#include <freertos/FreeRTOS.h>
22#include <freertos/task.h>
32template<
class Rep,
class Period>
33[[nodiscard]]
constexpr TickType_t
ticks(
const std::chrono::duration<Rep, Period>& d) {
34 return pdMS_TO_TICKS(std::chrono::ceil<std::chrono::milliseconds>(d).count());
46 using period = std::ratio<1, configTICK_RATE_HZ>;
47 using duration = std::chrono::duration<rep, period>;
constexpr TickType_t ticks(const std::chrono::duration< Rep, Period > &d)
Converts a std::chrono duration to TickType_t ticks.
ESP-IDF C++ chrono utilities.
Steady clock based on FreeRTOS tick count.
std::chrono::time_point< tick_clock > time_point
static time_point now() noexcept
Returns the current tick count as a time_point.
static constexpr bool is_steady
static time_point now_from_isr() noexcept
Returns the current tick count as a time_point from ISR context.
std::chrono::duration< rep, period > duration
std::ratio< 1, configTICK_RATE_HZ > period