idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::chrono::tick_clock Struct Reference

Steady clock based on FreeRTOS tick count. More...

Public Types

using rep = TickType_t
 
using period = std::ratio< 1, configTICK_RATE_HZ >
 
using duration = std::chrono::duration< rep, period >
 
using time_point = std::chrono::time_point< tick_clock >
 

Static Public Member Functions

static time_point now () noexcept
 Returns the current tick count as a time_point.
 
static time_point now_from_isr () noexcept
 Returns the current tick count as a time_point from ISR context.
 

Static Public Attributes

static constexpr bool is_steady = true
 

Detailed Description

Steady clock based on FreeRTOS tick count.

Provides a std::chrono-compatible clock with tick-based precision. The tick rate is determined by configTICK_RATE_HZ.

Definition at line 44 of file chrono.hpp.

Member Typedef Documentation

◆ duration

Definition at line 47 of file chrono.hpp.

◆ period

Definition at line 46 of file chrono.hpp.

◆ rep

◆ time_point

Definition at line 48 of file chrono.hpp.

Member Function Documentation

◆ now()

static time_point idfxx::chrono::tick_clock::now ( )
inlinestaticnoexcept

Returns the current tick count as a time_point.

Returns
Current time as a time_point.

Definition at line 55 of file chrono.hpp.

◆ now_from_isr()

static time_point idfxx::chrono::tick_clock::now_from_isr ( )
inlinestaticnoexcept

Returns the current tick count as a time_point from ISR context.

Returns
Current time as a time_point.

Definition at line 61 of file chrono.hpp.

Member Data Documentation

◆ is_steady

constexpr bool idfxx::chrono::tick_clock::is_steady = true
staticconstexpr

Definition at line 49 of file chrono.hpp.


The documentation for this struct was generated from the following file: