HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
chrono.h File Reference
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iterator>
#include <locale>
#include <ostream>
#include <type_traits>
#include "format.h"
+ Include dependency graph for chrono.h:

Go to the source code of this file.

Classes

struct  detail::null< T >
 
struct  detail::codecvt_result< CodeUnit >
 
struct  null_chrono_spec_handler< Derived >
 
struct  tm_format_checker
 
struct  has_member_data_tm_gmtoff< T, typename >
 
struct  has_member_data_tm_gmtoff< T, void_t< decltype(T::tm_gmtoff)> >
 
struct  has_member_data_tm_zone< T, typename >
 
struct  has_member_data_tm_zone< T, void_t< decltype(T::tm_zone)> >
 
struct  count_fractional_digits< Num, Den, N, Enabled >
 
struct  count_fractional_digits< Num, Den, N, false >
 
class  tm_writer< OutputIt, Char, Duration >
 
struct  chrono_format_checker
 
struct  make_unsigned_or_unchanged< T, INTEGRAL >
 
struct  make_unsigned_or_unchanged< T, true >
 
class  get_locale
 
struct  chrono_formatter< FormatContext, OutputIt, Rep, Period >
 
class  weekday
 
class  year_month_day
 
struct  formatter< weekday, Char >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >
 
struct  formatter< std::chrono::time_point< std::chrono::system_clock, Duration >, Char >
 
struct  formatter< std::tm, Char >
 

Namespaces

 safe_duration_cast
 
 detail
 

Macros

#define FMT_USE_LOCAL_TIME   0
 
#define FMT_USE_UTC_TIME   0
 
#define FMT_USE_TZSET   0
 
#define FMT_SAFE_DURATION_CAST   1
 
#define FMT_NOMACRO
 

Enumerations

enum  numeric_system { numeric_system::standard, numeric_system::alternative }
 
enum  pad_type { pad_type::unspecified, pad_type::none, pad_type::zero, pad_type::space }
 

Functions

template<typename To , typename From , FMT_ENABLE_IF(!std::is_same< From, To >::value &&std::numeric_limits< From >::is_signed==std::numeric_limits< To >::is_signed) >
FMT_CONSTEXPR To safe_duration_cast::lossless_integral_conversion (const From from, int &ec)
 
template<typename To , typename From , FMT_ENABLE_IF(!std::is_same< From, To >::value) >
FMT_CONSTEXPR To safe_duration_cast::safe_float_conversion (const From from, int &ec)
 
template<typename To , typename FromRep , typename FromPeriod , FMT_ENABLE_IF(std::is_integral< FromRep >::value) , FMT_ENABLE_IF(std::is_integral< typename To::rep >::value) >
To safe_duration_cast::safe_duration_cast (std::chrono::duration< FromRep, FromPeriod > from, int &ec)
 
null localtime_r detail::FMT_NOMACRO (...)
 
null detail::localtime_s (...)
 
null detail::gmtime_r (...)
 
null detail::gmtime_s (...)
 
const std::locale & detail::get_classic_locale ()
 
template<typename CodeUnit >
void detail::write_codecvt (codecvt_result< CodeUnit > &out, string_view in_buf, const std::locale &loc)
 
template<typename OutputIt >
auto detail::write_encoded_tm_str (OutputIt out, string_view in, const std::locale &loc) -> OutputIt
 
template<typename Char , typename OutputIt , FMT_ENABLE_IF(!std::is_same< Char, char >::value) >
auto detail::write_tm_str (OutputIt out, string_view sv, const std::locale &loc) -> OutputIt
 
template<typename Char >
void detail::do_write (buffer< Char > &buf, const std::tm &time, const std::locale &loc, char format, char modifier)
 
template<typename Char , typename OutputIt , FMT_ENABLE_IF(!std::is_same< Char, char >::value) >
auto detail::write (OutputIt out, const std::tm &time, const std::locale &loc, char format, char modifier=0) -> OutputIt
 
FMT_BEGIN_EXPORT std::tm localtime (std::time_t time)
 
std::tm gmtime (std::time_t time)
 
std::tm gmtime (std::chrono::time_point< std::chrono::system_clock > time_point)
 
template<typename Char >
FMT_BEGIN_DETAIL_NAMESPACE
FMT_CONSTEXPR auto 
parse_align (const Char *begin, const Char *end, format_specs< Char > &specs) -> const Char *
 
void write_digit2_separated (char *buf, unsigned a, unsigned b, unsigned c, char sep)
 
template<typename Period >
FMT_CONSTEXPR const char * get_units ()
 
template<typename OutputIt >
auto write_padding (OutputIt out, pad_type pad, int width) -> OutputIt
 
template<typename OutputIt >
auto write_padding (OutputIt out, pad_type pad) -> OutputIt
 
template<typename Char , typename Handler >
FMT_CONSTEXPR const Char * parse_chrono_format (const Char *begin, const Char *end, Handler &&handler)
 
const char * tm_wday_full_name (int wday)
 
const char * tm_wday_short_name (int wday)
 
const char * tm_mon_full_name (int mon)
 
const char * tm_mon_short_name (int mon)
 
template<typename T , typename Int , FMT_ENABLE_IF(std::is_integral< T >::value) >
Int to_nonnegative_int (T value, Int upper)
 
constexpr long long pow10 (std::uint32_t n)
 
template<typename Char , typename OutputIt , typename Duration >
void write_fractional_seconds (OutputIt &out, Duration d, int precision=-1)
 
template<typename Duration >
void write_floating_seconds (memory_buffer &buf, Duration duration, int num_fractional_digits=-1)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value &&has_isfinite< T >::value) >
bool isfinite (T)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
mod (T x, int y)
 
template<typename To , typename FromRep , typename FromPeriod >
To fmt_safe_duration_cast (std::chrono::duration< FromRep, FromPeriod > from)
 
template<typename Rep , typename Period , FMT_ENABLE_IF(std::is_integral< Rep >::value) >
std::chrono::duration< Rep,
std::milli > 
get_milliseconds (std::chrono::duration< Rep, Period > d)
 
template<typename Char , typename Rep , typename OutputIt , FMT_ENABLE_IF(std::is_integral< Rep >::value) >
OutputIt format_duration_value (OutputIt out, Rep val, int)
 
template<typename Char , typename OutputIt >
OutputIt copy_unit (string_view unit, OutputIt out, Char)
 
template<typename OutputIt >
OutputIt copy_unit (string_view unit, OutputIt out, wchar_t)
 
template<typename Char , typename Period , typename OutputIt >
OutputIt format_duration_unit (OutputIt out)
 

Macro Definition Documentation

#define FMT_NOMACRO

Definition at line 320 of file chrono.h.

#define FMT_SAFE_DURATION_CAST   1

Definition at line 59 of file chrono.h.

#define FMT_USE_LOCAL_TIME   0

Definition at line 30 of file chrono.h.

#define FMT_USE_TZSET   0

Definition at line 53 of file chrono.h.

#define FMT_USE_UTC_TIME   0

Definition at line 39 of file chrono.h.

Enumeration Type Documentation

enum numeric_system
strong
Enumerator
standard 
alternative 

Definition at line 635 of file chrono.h.

enum pad_type
strong
Enumerator
unspecified 
none 
zero 
space 

Definition at line 642 of file chrono.h.

Function Documentation

template<typename Char , typename OutputIt >
OutputIt copy_unit ( string_view  unit,
OutputIt  out,
Char   
)

Definition at line 1718 of file chrono.h.

template<typename OutputIt >
OutputIt copy_unit ( string_view  unit,
OutputIt  out,
wchar_t   
)

Definition at line 1723 of file chrono.h.

template<typename To , typename FromRep , typename FromPeriod >
To fmt_safe_duration_cast ( std::chrono::duration< FromRep, FromPeriod >  from)

Definition at line 1670 of file chrono.h.

template<typename Char , typename Period , typename OutputIt >
OutputIt format_duration_unit ( OutputIt  out)

Definition at line 1731 of file chrono.h.

template<typename Char , typename Rep , typename OutputIt , FMT_ENABLE_IF(std::is_integral< Rep >::value) >
OutputIt format_duration_value ( OutputIt  out,
Rep  val,
int  precision 
)

Definition at line 1703 of file chrono.h.

template<typename Rep , typename Period , FMT_ENABLE_IF(std::is_integral< Rep >::value) >
std::chrono::duration<Rep, std::milli> get_milliseconds ( std::chrono::duration< Rep, Period >  d)
inline

Definition at line 1680 of file chrono.h.

template<typename Period >
FMT_CONSTEXPR const char* get_units ( )
inline

Definition at line 612 of file chrono.h.

std::tm gmtime ( std::time_t  time)
inline

Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Universal Time (UTC). Unlike std::gmtime, this function is thread-safe on most platforms.

Definition at line 493 of file chrono.h.

std::tm gmtime ( std::chrono::time_point< std::chrono::system_clock >  time_point)
inline

Definition at line 528 of file chrono.h.

template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value &&has_isfinite< T >::value) >
bool isfinite ( )
inline

Definition at line 1643 of file chrono.h.

FMT_BEGIN_EXPORT std::tm localtime ( std::time_t  time)
inline

Converts given time since epoch as std::time_t value into calendar time, expressed in local time. Unlike std::localtime, this function is thread-safe on most platforms.

Definition at line 444 of file chrono.h.

template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
T mod ( x,
int  y 
)
inline

Definition at line 1648 of file chrono.h.

template<typename Char >
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR auto parse_align ( const Char *  begin,
const Char *  end,
format_specs< Char > &  specs 
) -> const Char*

Definition at line 537 of file chrono.h.

template<typename Char , typename Handler >
FMT_CONSTEXPR const Char* parse_chrono_format ( const Char *  begin,
const Char *  end,
Handler &&  handler 
)

Definition at line 667 of file chrono.h.

constexpr long long pow10 ( std::uint32_t  n)

Definition at line 1064 of file chrono.h.

const char* tm_mon_full_name ( int  mon)
inline

Definition at line 1012 of file chrono.h.

const char* tm_mon_short_name ( int  mon)
inline

Definition at line 1018 of file chrono.h.

const char* tm_wday_full_name ( int  wday)
inline

Definition at line 1000 of file chrono.h.

const char* tm_wday_short_name ( int  wday)
inline

Definition at line 1006 of file chrono.h.

template<typename T , typename Int , FMT_ENABLE_IF(std::is_integral< T >::value) >
Int to_nonnegative_int ( value,
Int  upper 
)
inline

Definition at line 1050 of file chrono.h.

void write_digit2_separated ( char *  buf,
unsigned  a,
unsigned  b,
unsigned  c,
char  sep 
)
inline

Definition at line 581 of file chrono.h.

template<typename Duration >
void write_floating_seconds ( memory_buffer buf,
Duration  duration,
int  num_fractional_digits = -1 
)

Definition at line 1137 of file chrono.h.

template<typename Char , typename OutputIt , typename Duration >
void write_fractional_seconds ( OutputIt &  out,
Duration  d,
int  precision = -1 
)

Definition at line 1088 of file chrono.h.

template<typename OutputIt >
auto write_padding ( OutputIt  out,
pad_type  pad,
int  width 
) -> OutputIt

Definition at line 654 of file chrono.h.

template<typename OutputIt >
auto write_padding ( OutputIt  out,
pad_type  pad 
) -> OutputIt

Definition at line 660 of file chrono.h.