spdlog
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations | Functions
chrono.h File Reference

Go to the source code of this file.

#include <algorithm>
#include <chrono>
#include <ctime>
#include <locale>
#include <sstream>
#include "format.h"

Classes

struct  detail::null< T >
 
struct  formatter< std::chrono::time_point< std::chrono::system_clock, Duration >, Char >
 
struct  formatter< std::tm, Char >
 
struct  null_chrono_spec_handler< Derived >
 
struct  chrono_format_checker
 
struct  make_unsigned_or_unchanged< T, INTEGRAL >
 
struct  make_unsigned_or_unchanged< T, true >
 
struct  chrono_formatter< FormatContext, OutputIt, Rep, Period >
 
class  weekday
 
struct  formatter< weekday >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >::spec_handler
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >::parse_range
 

Namespaces

namespace  detail
 

Macros

#define FMT_SAFE_DURATION_CAST   1
 
#define FMT_NOMACRO
 

Enumerations

enum class  numeric_system {
  standard ,
  alternative
}
 

Functions

null localtime_r detail::FMT_NOMACRO (...)
 
null detail::localtime_s (...)
 
null detail::gmtime_r (...)
 
null detail::gmtime_s (...)
 
auto detail::do_write (const std::tm &time, const std::locale &loc, char format, char modifier) -> std::string
 
template<typename OutputIt >
auto detail::write (OutputIt out, const std::tm &time, const std::locale &loc, char format, char modifier=0) -> OutputIt
 
FMT_MODULE_EXPORT_BEGIN std::tm localtime (std::time_t time)
 
std::tm localtime (std::chrono::time_point< std::chrono::system_clock > time_point)
 
std::tm gmtime (std::time_t time)
 
std::tm gmtime (std::chrono::time_point< std::chrono::system_clock > time_point)
 
FMT_BEGIN_DETAIL_NAMESPACE size_t strftime (char *str, size_t count, const char *format, const std::tm *time)
 
size_t strftime (wchar_t *str, size_t count, const wchar_t *format, const std::tm *time)
 
template<typename Period >
FMT_BEGIN_DETAIL_NAMESPACE FMT_CONSTEXPR const charget_units ()
 
template<typename Char , typename Handler >
FMT_CONSTEXPR const Char * parse_chrono_format (const Char *begin, const Char *end, Handler &&handler)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
bool isnan (T)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
bool isfinite (T)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
int to_nonnegative_int (T value, int upper)
 
template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
T mod (T x, int y)
 
template<typename Rep , typename Period , FMT_ENABLE_IF(std::is_integral< Rep >::value) >
std::chrono::duration< Rep, std::milliget_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

◆ FMT_NOMACRO

#define FMT_NOMACRO

Definition at line 282 of file bundled/chrono.h.

◆ FMT_SAFE_DURATION_CAST

#define FMT_SAFE_DURATION_CAST   1

Definition at line 23 of file bundled/chrono.h.

Enumeration Type Documentation

◆ numeric_system

enum class numeric_system
strong
Enumerator
standard 
alternative 

Definition at line 576 of file bundled/chrono.h.

Function Documentation

◆ copy_unit() [1/2]

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

Definition at line 902 of file bundled/chrono.h.

◆ copy_unit() [2/2]

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

Definition at line 907 of file bundled/chrono.h.

◆ format_duration_unit()

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

Definition at line 915 of file bundled/chrono.h.

◆ format_duration_value()

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 888 of file bundled/chrono.h.

◆ get_milliseconds()

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 854 of file bundled/chrono.h.

◆ get_units()

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

Definition at line 553 of file bundled/chrono.h.

◆ gmtime() [1/2]

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

Definition at line 449 of file bundled/chrono.h.

◆ gmtime() [2/2]

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 414 of file bundled/chrono.h.

◆ isfinite()

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

Definition at line 796 of file bundled/chrono.h.

◆ isnan()

template<typename T , FMT_ENABLE_IF(std::is_integral< T >::value) >
bool isnan ( T  value)
inline

Definition at line 787 of file bundled/chrono.h.

◆ localtime() [1/2]

std::tm localtime ( std::chrono::time_point< std::chrono::system_clock time_point)
inline

Definition at line 404 of file bundled/chrono.h.

◆ localtime() [2/2]

FMT_MODULE_EXPORT_BEGIN 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 368 of file bundled/chrono.h.

◆ mod()

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

Definition at line 822 of file bundled/chrono.h.

◆ parse_chrono_format()

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

Definition at line 584 of file bundled/chrono.h.

◆ strftime() [1/2]

FMT_BEGIN_DETAIL_NAMESPACE size_t strftime ( char str,
size_t  count,
const char format,
const std::tm time 
)
inline

Definition at line 456 of file bundled/chrono.h.

◆ strftime() [2/2]

size_t strftime ( wchar_t str,
size_t  count,
const wchar_t format,
const std::tm time 
)
inline

Definition at line 466 of file bundled/chrono.h.

◆ to_nonnegative_int()

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

Definition at line 806 of file bundled/chrono.h.