RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
VendorClock< Epoch, Rep, Period > Struct Template Reference

A static class that encodes a specific timestamp format. More...

#include <common.h>

Public Types

using rep = Rep
 
using period = Period
 
using duration = std::chrono::duration< rep, period >
 
using time_point = std::chrono::time_point< VendorClock >
 

Static Public Member Functions

static constexpr rep to_ticks (duration dur)
 
static constexpr rep to_ticks (time_point tp)
 
static constexpr duration to_duration (Rep ticks)
 
static constexpr time_point to_time_point (duration dur)
 
static constexpr time_point to_time_point (Rep ticks)
 
static constexpr time_point to_time_point (std::chrono::time_point< std::chrono::system_clock > tp)
 
static constexpr time_point to_time_point (std::chrono::sys_days days, std::chrono::nanoseconds ns)
 
template<typename FromClock >
static time_point convert (std::chrono::time_point< FromClock > from)
 
static constexpr std::chrono::sys_days to_days (time_point tp)
 
static constexpr std::chrono::nanoseconds to_nanoseconds (time_point tp)
 
static std::string to_iso_time (time_point tp)
 
static time_point now () noexcept
 

Static Public Attributes

static constexpr bool is_steady = false
 

Detailed Description

template<typename Epoch, typename Rep = int32_t, typename Period = std::ratio<1>>
struct VendorClock< Epoch, Rep, Period >

A static class that encodes a specific timestamp format.

This structure satisfies the requirements for a Clock.

Template Parameters
EpochThe starting date, corresponding to the zero timestamp value
RepThe binary representation (typically int32_t)
PeriodThe unit of time period corresponding to increasing the binary representation by 1

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