NanoTime::TicksConst< Clock_, ticks_ > Struct Template Reference

Class template representing a fixed clock tick count. More...

#include <NanoTime.h>

Public Types

using Clock = Clock_
 
using TickType = uint64_t
 
using TimeType = uint64_t
 
template<Unit unit>
using TimeConst = TimeConst< Clock, unit, TimeType(round(double(ticks_) *Clock::template TicksPerUnit< unit >::den/Clock::template TicksPerUnit< unit >::num))>
 

Public Member Functions

constexpr operator TickType ()
 

Static Public Member Functions

static constexpr TickType ticks ()
 
static constexpr void check ()
 Obtain the tick count with a static range check against Clock maxTicks. More...
 
template<Unit unit>
static constexpr TimeConst< unit > as ()
 Get the time for the tick count in a specific time unit. More...
 
static String toString ()
 

Detailed Description

template<class Clock_, uint64_t ticks_>
struct NanoTime::TicksConst< Clock_, ticks_ >

Class template representing a fixed clock tick count.

Template Parameters
Source_
ticks_
Note
Includes compile-time range checking

Member Typedef Documentation

◆ Clock

template<class Clock_ , uint64_t ticks_>
using NanoTime::TicksConst< Clock_, ticks_ >::Clock = Clock_

◆ TickType

template<class Clock_ , uint64_t ticks_>
using NanoTime::TicksConst< Clock_, ticks_ >::TickType = uint64_t

◆ TimeConst

template<class Clock_ , uint64_t ticks_>
template<Unit unit>
using NanoTime::TicksConst< Clock_, ticks_ >::TimeConst = TimeConst<Clock, unit, TimeType(round(double(ticks_) * Clock::template TicksPerUnit<unit>::den / Clock::template TicksPerUnit<unit>::num))>

◆ TimeType

template<class Clock_ , uint64_t ticks_>
using NanoTime::TicksConst< Clock_, ticks_ >::TimeType = uint64_t

Member Function Documentation

◆ as()

template<class Clock_ , uint64_t ticks_>
template<Unit unit>
static constexpr TimeConst<unit> NanoTime::TicksConst< Clock_, ticks_ >::as ( )
inlinestaticconstexpr

Get the time for the tick count in a specific time unit.

Template Parameters
unit
Return values
Time<TimeType>

◆ check()

template<class Clock_ , uint64_t ticks_>
static constexpr void NanoTime::TicksConst< Clock_, ticks_ >::check ( )
inlinestaticconstexpr

Obtain the tick count with a static range check against Clock maxTicks.

Return values
TimeType

◆ operator TickType()

template<class Clock_ , uint64_t ticks_>
constexpr NanoTime::TicksConst< Clock_, ticks_ >::operator TickType ( )
inlineconstexpr

◆ ticks()

template<class Clock_ , uint64_t ticks_>
static constexpr TickType NanoTime::TicksConst< Clock_, ticks_ >::ticks ( )
inlinestaticconstexpr

◆ toString()

template<class Clock_ , uint64_t ticks_>
static String NanoTime::TicksConst< Clock_, ticks_ >::toString ( )
inlinestatic

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