STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Typedefs | Functions
chrono File Reference
#include <limits>
#include <ratio>
#include <utility>
#include <time.h>
#include <thr/xtimec.h>

Classes

struct  chrono::treat_as_floating_point< _Rep >
 
struct  chrono::duration_values< _Rep >
 
struct  chrono::_Is_ratio< _Ty >
 
struct  chrono::_Is_ratio< ratio< _R1, _R2 > >
 
class  chrono::duration< _Rep, _Period >
 
struct  chrono::_Is_duration< _Ty >
 
struct  chrono::_Is_duration< duration< _Rep, _Period > >
 
class  chrono::duration< _Rep, _Period >
 
class  chrono::time_point< _Clock, _Duration >
 
struct  _Lcm< _Ax, _Bx >
 
struct  common_type< chrono::duration< _Rep1, _Period1 >, chrono::duration< _Rep2, _Period2 > >
 
struct  common_type< chrono::time_point< _Clock, _Duration1 >, chrono::time_point< _Clock, _Duration2 > >
 
struct  chrono::_Duration_div_mod1< _CR, _Period1, _Rep2, bool >
 
struct  chrono::_Duration_div_mod1< _CR, _Period1, _Rep2, false >
 
struct  chrono::_Duration_div_mod< _Rep1, _Period1, _Rep2, bool >
 
struct  chrono::_Duration_div_mod< _Rep1, _Period1, _Rep2, false >
 
struct  chrono::system_clock
 
struct  chrono::steady_clock
 

Namespaces

 chrono
 
 literals
 
 literals::chrono_literals
 

Macros

#define _CHRONO_
 

Typedefs

template<class _Dur >
using chrono::_As_integral = duration< typename conditional< treat_as_floating_point< typename _Dur::rep >::value, intmax_t, typename _Dur::rep >::type, typename _Dur::period >
 
typedef duration< long long, nanochrono::nanoseconds
 
typedef duration< long long, microchrono::microseconds
 
typedef duration< long long, millichrono::milliseconds
 
typedef duration< long long > chrono::seconds
 
typedef duration< int, ratio< 60 > > chrono::minutes
 
typedef duration< int, ratio< 3600 > > chrono::hours
 
typedef steady_clock chrono::high_resolution_clock
 

Functions

template<class _To , class _Rep , class _Period >
constexpr enable_if< _Is_duration< _To >::value, _To >::type chrono::duration_cast (const duration< _Rep, _Period > &)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type chrono::operator+ (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type chrono::operator- (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 >
constexpr enable_if< is_convertible< _Rep2, typename common_type< _Rep1, _Rep2 >::type >::value, duration< typename common_type< _Rep1, _Rep2 >::type, _Period1 > >::type chrono::operator* (const duration< _Rep1, _Period1 > &_Left, const _Rep2 &_Right)
 
template<class _Rep1 , class _Rep2 , class _Period2 >
constexpr enable_if< is_convertible< _Rep1, typename common_type< _Rep1, _Rep2 >::type >::value, duration< typename common_type< _Rep1, _Rep2 >::type, _Period2 > >::type chrono::operator* (const _Rep1 &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 >
_Duration_div_mod< _Rep1, _Period1, _Rep2 >::type constexpr chrono::operator/ (const duration< _Rep1, _Period1 > &_Left, const _Rep2 &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr common_type< _Rep1, _Rep2 >::type chrono::operator/ (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 >
constexpr _Duration_div_mod< _Rep1, _Period1, _Rep2 >::type chrono::operator% (const duration< _Rep1, _Period1 > &_Left, const _Rep2 &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type chrono::operator% (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator== (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator!= (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator< (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator<= (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator> (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep1 , class _Period1 , class _Rep2 , class _Period2 >
constexpr bool chrono::operator>= (const duration< _Rep1, _Period1 > &_Left, const duration< _Rep2, _Period2 > &_Right)
 
template<class _Rep , class _Period , class _To_integral >
constexpr _To_integral chrono::_Floor (const duration< _Rep, _Period > &_Dur, const _To_integral &_Dur_integral)
 
template<class _To , class _Rep , class _Period >
constexpr enable_if< _Is_duration< _To >::value, _To >::type chrono::floor (const duration< _Rep, _Period > &_Dur)
 
template<class _Rep , class _Period , class _To_integral >
constexpr _To_integral chrono::_Ceil (const duration< _Rep, _Period > &_Dur, const _To_integral &_Dur_integral)
 
template<class _To , class _Rep , class _Period >
constexpr enable_if< _Is_duration< _To >::value, _To >::type chrono::ceil (const duration< _Rep, _Period > &_Dur)
 
template<class _Rep >
constexpr make_unsigned< _Rep >::type chrono::_Make_unsigned (_Rep _Val)
 
template<class _Rep >
constexpr bool chrono::_Is_even (_Rep _Val)
 
template<class _Rep >
constexpr _Rep chrono::_Bankers_divide_impl (_Rep _Truncated, _Rep _Mod, _Rep _Half_divisor, bool _Half_divisor_is_exact)
 
template<class _Rep >
constexpr _Rep chrono::_Bankers_divide_tag (_Rep _Dividend, _Rep _Divisor, false_type)
 
template<class _Rep >
constexpr _Rep chrono::_Bankers_divide_tag (_Rep _Dividend, _Rep _Divisor, true_type)
 
template<class _Rep >
constexpr _Rep chrono::_Bankers_divide (_Rep _Dividend, _Rep _Divisor)
 
template<class _Rep >
constexpr bool chrono::_Round_should_truncate (_Rep _Val, intmax_t _Val_trunc)
 
template<class _Rep >
constexpr intmax_t chrono::_Round_fp_non_negative (_Rep _Val, intmax_t _Val_trunc)
 
template<class _Rep >
constexpr intmax_t chrono::_Round_fp_non_negative (_Rep _Val)
 
template<class _Rep >
constexpr _Rep chrono::_Round_fp (_Rep _Val)
 
template<class _To , class _Rep , class _Period >
constexpr _To chrono::_Round (const duration< _Rep, _Period > &_Dur, false_type, false_type)
 
template<class _To , class _Rep , class _Period >
constexpr _To chrono::_Round (const duration< _Rep, _Period > &_Dur, false_type, true_type)
 
template<class _To , class _Rep , class _Period , class _Source_integral >
constexpr _To chrono::_Round (const duration< _Rep, _Period > &_Dur, true_type, _Source_integral)
 
template<class _To , class _Rep , class _Period >
constexpr enable_if< _Is_duration< _To >::value, _To >::type chrono::round (const duration< _Rep, _Period > &_Dur)
 
template<class _Rep , class _Period >
constexpr enable_if< numeric_limits< _Rep >::is_signed, duration< _Rep, _Period > >::type chrono::abs (const duration< _Rep, _Period > _Dur)
 
template<class _Clock , class _Duration , class _Rep , class _Period >
constexpr time_point< _Clock, typename common_type< _Duration, duration< _Rep, _Period > >::type > chrono::operator+ (const time_point< _Clock, _Duration > &_Left, const duration< _Rep, _Period > &_Right)
 
template<class _Rep , class _Period , class _Clock , class _Duration >
constexpr time_point< _Clock, typename common_type< duration< _Rep, _Period >, _Duration >::type > chrono::operator+ (const duration< _Rep, _Period > &_Left, const time_point< _Clock, _Duration > &_Right)
 
template<class _Clock , class _Duration , class _Rep , class _Period >
constexpr time_point< _Clock, typename common_type< _Duration, duration< _Rep, _Period > >::type > chrono::operator- (const time_point< _Clock, _Duration > &_Left, const duration< _Rep, _Period > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr common_type< _Duration1, _Duration2 >::type chrono::operator- (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator== (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator!= (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator< (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator<= (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator> (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _Clock , class _Duration1 , class _Duration2 >
constexpr bool chrono::operator>= (const time_point< _Clock, _Duration1 > &_Left, const time_point< _Clock, _Duration2 > &_Right)
 
template<class _To , class _Clock , class _Duration >
constexpr enable_if< _Is_duration< _To >::value, time_point< _Clock, _To > >::type chrono::time_point_cast (const time_point< _Clock, _Duration > &_Time)
 
template<class _To , class _Clock , class _Duration >
constexpr enable_if< _Is_duration< _To >::value, time_point< _Clock, _To > >::type chrono::floor (const time_point< _Clock, _Duration > &_Time)
 
template<class _To , class _Clock , class _Duration >
constexpr enable_if< _Is_duration< _To >::value, time_point< _Clock, _To > >::type chrono::ceil (const time_point< _Clock, _Duration > &_Time)
 
template<class _To , class _Clock , class _Duration >
constexpr enable_if< _Is_duration< _To >::value, time_point< _Clock, _To > >::type chrono::round (const time_point< _Clock, _Duration > &_Time)
 
template<class _Rep , class _Period >
xtime _To_xtime (const chrono::duration< _Rep, _Period > &_Rel_time)
 
constexpr chrono::hours literals::chrono_literals::operator""h (unsigned long long _Val)
 
constexpr chrono::duration< double, ratio< 3600 > > literals::chrono_literals::operator""h (long double _Val)
 
constexpr chrono::seconds literals::chrono_literals::operator""s (unsigned long long _Val)
 
constexpr chrono::duration< double > literals::chrono_literals::operator""s (long double _Val)
 
constexpr chrono::milliseconds literals::chrono_literals::operator""ms (unsigned long long _Val)
 
constexpr chrono::duration< double, milliliterals::chrono_literals::operator""ms (long double _Val)
 
constexpr chrono::microseconds literals::chrono_literals::operator""us (unsigned long long _Val)
 
constexpr chrono::duration< double, microliterals::chrono_literals::operator""us (long double _Val)
 
constexpr chrono::nanoseconds literals::chrono_literals::operator""ns (unsigned long long _Val)
 
constexpr chrono::duration< double, nanoliterals::chrono_literals::operator""ns (long double _Val)
 

Macro Definition Documentation

#define _CHRONO_

Function Documentation

template<class _Rep , class _Period >
xtime _To_xtime ( const chrono::duration< _Rep, _Period > &  _Rel_time)
inline
1015  { // convert duration to xtime
1016  xtime _Xt;
1017  if (_Rel_time <= chrono::duration<_Rep, _Period>::zero())
1018  { // negative or zero relative time, return zero
1019  _Xt.sec = 0;
1020  _Xt.nsec = 0;
1021  }
1022  else
1023  { // positive relative time, convert
1024  chrono::nanoseconds _T0 =
1026  _T0 += chrono::duration_cast<chrono::nanoseconds>(_Rel_time);
1028  _T0 -= chrono::seconds(_Xt.sec);
1029  _Xt.nsec = (long)_T0.count();
1030  }
1031  return (_Xt);
1032  }
Definition: chrono:71
__time64_t sec
Definition: xtimec.h:20
static time_point now() _NOEXCEPT
Definition: chrono:972
_Iter_diff_t< _InIt > count(_InIt _First, _InIt _Last, const _Ty &_Val)
Definition: xutility:3318
Definition: xtimec.h:18
constexpr _Duration time_since_epoch() const
Definition: chrono:256
constexpr _Rep count() const
Definition: chrono:133
long nsec
Definition: xtimec.h:21
constexpr enable_if< _Is_duration< _To >::value, _To >::type duration_cast(const duration< _Rep, _Period > &)
Definition: chrono:550
duration< long long > seconds
Definition: chrono:794