HOPS
HOPS class reference
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
hops::utc_clock Struct Reference

UTC clock: real SI seconds since 1970-01-01 including leap seconds. More...

#include <hops_leap_seconds.hh>

Public Types

using duration = std::chrono::system_clock::duration
 
using period = duration::period
 
using rep = duration::rep
 
using time_point = std::chrono::time_point< utc_clock >
 

Static Public Member Functions

template<class Duration >
static utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > from_local (const date::local_time< Duration > &lt)
 
template<class Duration >
static utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > from_sys (const date::sys_time< Duration > &st)
 
static utc_time< std::chrono::nanoseconds > now ()
 
template<class Duration >
static date::local_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_local (const utc_time< Duration > &ut)
 
template<class Duration >
static date::sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > to_sys (const utc_time< Duration > &ut)
 

Static Public Attributes

static CONSTDATA bool is_steady = false
 

Detailed Description

UTC clock: real SI seconds since 1970-01-01 including leap seconds.

Member Typedef Documentation

◆ duration

using hops::utc_clock::duration = std::chrono::system_clock::duration

◆ period

using hops::utc_clock::period = duration::period

◆ rep

using hops::utc_clock::rep = duration::rep

◆ time_point

using hops::utc_clock::time_point = std::chrono::time_point< utc_clock >

Member Function Documentation

◆ from_local()

template<class Duration >
static utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > hops::utc_clock::from_local ( const date::local_time< Duration > &  lt)
inlinestatic

◆ from_sys()

template<class Duration >
static utc_time< typename std::common_type< Duration, std::chrono::seconds >::type > hops::utc_clock::from_sys ( const date::sys_time< Duration > &  st)
inlinestatic

◆ now()

static utc_time< std::chrono::nanoseconds > hops::utc_clock::now ( )
inlinestatic

◆ to_local()

template<class Duration >
static date::local_time< typename std::common_type< Duration, std::chrono::seconds >::type > hops::utc_clock::to_local ( const utc_time< Duration > &  ut)
inlinestatic

◆ to_sys()

template<class Duration >
static date::sys_time< typename std::common_type< Duration, std::chrono::seconds >::type > hops::utc_clock::to_sys ( const utc_time< Duration > &  ut)
inlinestatic

Member Data Documentation

◆ is_steady

CONSTDATA bool hops::utc_clock::is_steady = false
static

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