tin  1.5.9
ticks.h File Reference

Target-neutral tick value type. More...

#include <chrono>
#include <cstdint>
#include <ratio>
#include <type_traits>
Include dependency graph for ticks.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tsm::tick_count
 Strong value type for semantic scheduler ticks. More...
 

Namespaces

 tsm
 

Macros

#define TSM_TICK_REP   std::uint32_t
 
#define TSM_TICK_PERIOD   std::ratio<1>
 

Typedefs

using tsm::tick_rep = TSM_TICK_REP
 
using tsm::tick_period = TSM_TICK_PERIOD
 
using tsm::tick_duration = std::chrono::duration< tick_rep, tick_period >
 Chrono duration type used for semantic scheduler ticks. More...
 

Functions

consteval tick_count tsm::operator""_ticks (unsigned long long value)
 
constexpr tick_count tsm::ticks (tick_rep value) noexcept
 
template<typename Rep , typename Period >
constexpr tick_count tsm::ticks (std::chrono::duration< Rep, Period > value) noexcept
 

Detailed Description

Target-neutral tick value type.

A tick is the runtime's semantic time quantum. Platform code decides whether one tick represents 1 ms, 1 s, a SysTick interrupt, a FreeRTOS tick, or a simulated host interval. HSM and task code receives only this explicit count.

Macro Definition Documentation

◆ TSM_TICK_PERIOD

#define TSM_TICK_PERIOD   std::ratio<1>

◆ TSM_TICK_REP

#define TSM_TICK_REP   std::uint32_t