distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::TickClock Class Reference

TickClock is a std::chrono clock, equivalent of std::chrono::steady_clock. More...

#include <TickClock.hpp>

Public Types

using rep = uint64_t
 type of tick counter More...
 
using period = std::ratio< 1, CONFIG_TICK_FREQUENCY >
 std::ratio type representing the tick period of the clock, seconds More...
 
using duration = std::chrono::duration< rep, period >
 basic duration type of clock More...
 
using time_point = std::chrono::time_point< TickClock >
 basic time_point type of clock More...
 

Static Public Member Functions

static time_point now ()
 

Static Public Attributes

static constexpr bool is_steady {true}
 this is a steady clock - it cannot be adjusted More...
 

Detailed Description

TickClock is a std::chrono clock, equivalent of std::chrono::steady_clock.

Member Typedef Documentation

◆ duration

using distortos::TickClock::duration = std::chrono::duration<rep, period>

basic duration type of clock

◆ period

using distortos::TickClock::period = std::ratio<1, CONFIG_TICK_FREQUENCY>

std::ratio type representing the tick period of the clock, seconds

◆ rep

using distortos::TickClock::rep = uint64_t

type of tick counter

◆ time_point

using distortos::TickClock::time_point = std::chrono::time_point<TickClock>

basic time_point type of clock

Member Function Documentation

◆ now()

TickClock::time_point distortos::TickClock::now ( )
static
Returns
time_point representing the current value of the clock
Here is the call graph for this function:

Member Data Documentation

◆ is_steady

constexpr bool distortos::TickClock::is_steady {true}
static

this is a steady clock - it cannot be adjusted


The documentation for this class was generated from the following files: