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

Monotonic clock based on boot time. More...

Public Types

using rep = int64_t
 
using period = std::micro
 
using duration = std::chrono::microseconds
 
using time_point = std::chrono::time_point< clock >
 

Static Public Member Functions

static time_point now () noexcept
 Returns the current time.
 

Static Public Attributes

static constexpr bool is_steady = true
 

Detailed Description

Monotonic clock based on boot time.

Provides a steady clock with microsecond precision that continues running during light sleep. Compatible with std::chrono.

Definition at line 50 of file timer.hpp.

Member Typedef Documentation

◆ duration

using idfxx::timer::clock::duration = std::chrono::microseconds

Definition at line 53 of file timer.hpp.

◆ period

Definition at line 52 of file timer.hpp.

◆ rep

Definition at line 51 of file timer.hpp.

◆ time_point

using idfxx::timer::clock::time_point = std::chrono::time_point<clock>

Definition at line 54 of file timer.hpp.

Member Function Documentation

◆ now()

static time_point idfxx::timer::clock::now ( )
inlinestaticnoexcept

Returns the current time.

Returns
Current time as a time_point.

Definition at line 61 of file timer.hpp.

Referenced by idfxx::timer::try_start_once().

Member Data Documentation

◆ is_steady

constexpr bool idfxx::timer::clock::is_steady = true
staticconstexpr

Definition at line 55 of file timer.hpp.


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