Classes | Namespaces | Enumerations | Functions
chrono.h File Reference
#include "format.h"
#include "locale.h"
#include <chrono>
#include <ctime>
#include <locale>
#include <sstream>

Go to the source code of this file.

Classes

struct  internal::chrono_format_checker
 
struct  internal::chrono_formatter< FormatContext, OutputIt >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >::spec_handler
 

Namespaces

 internal
 

Enumerations

enum  internal::numeric_system { internal::numeric_system::standard, internal::numeric_system::alternative }
 

Functions

template<typename Char , typename Handler >
FMT_CONSTEXPR const Char * internal::parse_chrono_format (const Char *begin, const Char *end, Handler &&handler)
 
template<typename Int >
int internal::to_int (Int value)
 
template<typename Period >
FMT_CONSTEXPR const char * get_units ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::atto > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::femto > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::pico > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::nano > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::micro > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::milli > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::centi > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::deci > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::ratio< 1 > > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::deca > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::hecto > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::kilo > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::mega > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::giga > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::tera > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::peta > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::exa > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::ratio< 60 > > ()
 
template<>
FMT_CONSTEXPR const char * get_units< std::ratio< 3600 > > ()
 

Function Documentation

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

Definition at line 344 of file chrono.h.

344  {
345  return FMT_NULL;
346 }
#define FMT_NULL
Definition: core.h:107
template<>
FMT_CONSTEXPR const char* get_units< std::atto > ( )

Definition at line 347 of file chrono.h.

347 { return "as"; }
template<>
FMT_CONSTEXPR const char* get_units< std::centi > ( )

Definition at line 353 of file chrono.h.

353 { return "cs"; }
template<>
FMT_CONSTEXPR const char* get_units< std::deca > ( )

Definition at line 356 of file chrono.h.

356 { return "das"; }
template<>
FMT_CONSTEXPR const char* get_units< std::deci > ( )

Definition at line 354 of file chrono.h.

354 { return "ds"; }
template<>
FMT_CONSTEXPR const char* get_units< std::exa > ( )

Definition at line 363 of file chrono.h.

363 { return "Es"; }
template<>
FMT_CONSTEXPR const char* get_units< std::femto > ( )

Definition at line 348 of file chrono.h.

348 { return "fs"; }
template<>
FMT_CONSTEXPR const char* get_units< std::giga > ( )

Definition at line 360 of file chrono.h.

360 { return "Gs"; }
template<>
FMT_CONSTEXPR const char* get_units< std::hecto > ( )

Definition at line 357 of file chrono.h.

357 { return "hs"; }
template<>
FMT_CONSTEXPR const char* get_units< std::kilo > ( )

Definition at line 358 of file chrono.h.

358 { return "ks"; }
template<>
FMT_CONSTEXPR const char* get_units< std::mega > ( )

Definition at line 359 of file chrono.h.

359 { return "Ms"; }
template<>
FMT_CONSTEXPR const char* get_units< std::micro > ( )

Definition at line 351 of file chrono.h.

351 { return "µs"; }
template<>
FMT_CONSTEXPR const char* get_units< std::milli > ( )

Definition at line 352 of file chrono.h.

352 { return "ms"; }
template<>
FMT_CONSTEXPR const char* get_units< std::nano > ( )

Definition at line 350 of file chrono.h.

350 { return "ns"; }
template<>
FMT_CONSTEXPR const char* get_units< std::peta > ( )

Definition at line 362 of file chrono.h.

362 { return "Ps"; }
template<>
FMT_CONSTEXPR const char* get_units< std::pico > ( )

Definition at line 349 of file chrono.h.

349 { return "ps"; }
template<>
FMT_CONSTEXPR const char* get_units< std::ratio< 1 > > ( )

Definition at line 355 of file chrono.h.

355 { return "s"; }
template<>
FMT_CONSTEXPR const char* get_units< std::ratio< 3600 > > ( )

Definition at line 367 of file chrono.h.

367  {
368  return "h";
369 }
template<>
FMT_CONSTEXPR const char* get_units< std::ratio< 60 > > ( )

Definition at line 364 of file chrono.h.

364  {
365  return "m";
366 }
template<>
FMT_CONSTEXPR const char* get_units< std::tera > ( )

Definition at line 361 of file chrono.h.

361 { return "Ts"; }