HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes
tt::sync_clock< C1, C2 > Struct Template Reference

#include <TTauri/Foundation/sync_clock.hpp>

Public Types

using slow_clock = C1
 
using fast_clock = C2
 
using rep = typename slow_clock::rep
 
using period = typename slow_clock::period
 
using duration = typename slow_clock::duration
 
using time_point = typename slow_clock::time_point
 

Static Public Member Functions

static time_point convert (typename fast_clock::time_point fast_time) noexcept
 
static duration convert (typename fast_clock::duration fast_duration) noexcept
 
static time_point now () noexcept
 

Static Public Attributes

static const bool is_steady = slow_clock::is_steady
 

Detailed Description

template<typename C1, typename C2>
struct tt::sync_clock< C1, C2 >

A clock which converts one clock to another clock. The new clock is similar to C1 (slow clock), except that leap seconds from C1 are filtered out. Leap seconds are filtered out because calibration to the slow clock does not happen often enough to react in-time to a leap second.

This clock is most often used to convert a cpu_counter_clock to a hires_tai_clock.

Parameters
C1A clock with known epoch and known frequency.
C2A monotonic clock which may have an unknown epoch and/or unknown frequency.

Member Function Documentation

◆ convert()

template<typename C1 , typename C2 >
static time_point tt::sync_clock< C1, C2 >::convert ( typename fast_clock::time_point fast_time)
inlinestaticnoexcept

Return a timestamp from a clock.


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