NanoTime::TimeConst< Clock_, unit_, time_ > Struct Template Reference

Class template to represent a fixed time value for a specific Clock. More...

#include <NanoTime.h>

Public Types

using Clock = Clock_
 
using TicksPerUnit = typename Clock::template TicksPerUnit< unit_ >
 

Public Member Functions

constexpr operator uint64_t ()
 

Static Public Member Functions

static constexpr Clock clock ()
 
static constexpr Unit unit ()
 
static constexpr uint64_t time ()
 
static Ratio32 ticksPerUnit ()
 Get ticks per unit as a Ratio object. More...
 
static constexpr uint64_t ticks ()
 Return the corresponding tick value for the time interval. More...
 
static constexpr void check ()
 Use this function to perform a static (compile-time) range check against Clock maxTicks. More...
 
static constexpr uint64_t clockTime ()
 Obtain the actual Clock time by converting tick value. More...
 
template<Unit unit>
static constexpr uint64_t as ()
 Obtain the time in a different set of units. More...
 
static TimeValue value ()
 
static TimeValue clockValue ()
 
static String toString ()
 

Detailed Description

template<class Clock_, Unit unit_, uint64_t time_>
struct NanoTime::TimeConst< Clock_, unit_, time_ >

Class template to represent a fixed time value for a specific Clock.

Template Parameters
Clock_
unit_
time_
Note
Includes compile-time range checking. Time is taken as reference for conversions.

Member Typedef Documentation

◆ Clock

template<class Clock_ , Unit unit_, uint64_t time_>
using NanoTime::TimeConst< Clock_, unit_, time_ >::Clock = Clock_

◆ TicksPerUnit

template<class Clock_ , Unit unit_, uint64_t time_>
using NanoTime::TimeConst< Clock_, unit_, time_ >::TicksPerUnit = typename Clock::template TicksPerUnit<unit_>

Member Function Documentation

◆ as()

template<class Clock_ , Unit unit_, uint64_t time_>
template<Unit unit>
static constexpr uint64_t NanoTime::TimeConst< Clock_, unit_, time_ >::as ( )
inlinestatic

Obtain the time in a different set of units.

Template Parameters
unit
Return values
TimeType

◆ check()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr void NanoTime::TimeConst< Clock_, unit_, time_ >::check ( )
inlinestatic

Use this function to perform a static (compile-time) range check against Clock maxTicks.

Return values
TimeType

◆ clock()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr Clock NanoTime::TimeConst< Clock_, unit_, time_ >::clock ( )
inlinestatic

◆ clockTime()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr uint64_t NanoTime::TimeConst< Clock_, unit_, time_ >::clockTime ( )
inlinestatic

Obtain the actual Clock time by converting tick value.

Return values
TimeType

◆ clockValue()

template<class Clock_ , Unit unit_, uint64_t time_>
static TimeValue NanoTime::TimeConst< Clock_, unit_, time_ >::clockValue ( )
inlinestatic

◆ operator uint64_t()

template<class Clock_ , Unit unit_, uint64_t time_>
constexpr NanoTime::TimeConst< Clock_, unit_, time_ >::operator uint64_t ( )
inline

◆ ticks()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr uint64_t NanoTime::TimeConst< Clock_, unit_, time_ >::ticks ( )
inlinestatic

Return the corresponding tick value for the time interval.

Return values
TimeType

◆ ticksPerUnit()

template<class Clock_ , Unit unit_, uint64_t time_>
static Ratio32 NanoTime::TimeConst< Clock_, unit_, time_ >::ticksPerUnit ( )
inlinestatic

Get ticks per unit as a Ratio object.

Return values
BasicRatio32

◆ time()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr uint64_t NanoTime::TimeConst< Clock_, unit_, time_ >::time ( )
inlinestatic

◆ toString()

template<class Clock_ , Unit unit_, uint64_t time_>
static String NanoTime::TimeConst< Clock_, unit_, time_ >::toString ( )
inlinestatic

◆ unit()

template<class Clock_ , Unit unit_, uint64_t time_>
static constexpr Unit NanoTime::TimeConst< Clock_, unit_, time_ >::unit ( )
inlinestatic

◆ value()

template<class Clock_ , Unit unit_, uint64_t time_>
static TimeValue NanoTime::TimeConst< Clock_, unit_, time_ >::value ( )
inlinestatic

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