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>
|
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_>
|
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_>
|
inlinestatic |
◆ clockTime()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
Obtain the actual Clock time by converting tick value.
- Return values
-
TimeType
◆ clockValue()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
◆ operator uint64_t()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inline |
◆ ticks()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
Return the corresponding tick value for the time interval.
- Return values
-
TimeType
◆ ticksPerUnit()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
Get ticks per unit as a Ratio object.
- Return values
-
BasicRatio32
◆ time()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
◆ toString()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
◆ unit()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
◆ value()
template<class Clock_ , Unit unit_, uint64_t time_>
|
inlinestatic |
The documentation for this struct was generated from the following file: