| The Gaudi Framework v32r1 (f65d50dc)

Functions
std::chrono::io Namespace Reference

Helpers to stream duration objects with proper units. More...

## Functions
template<typename T >
std::string | duration_unit (T)
| Return unit of std::chrono::duration. More...
template<>
std::string | duration_unit (std::chrono::nanoseconds)
template<>
std::string | duration_unit (std::chrono::microseconds)
template<>
std::string | duration_unit (std::chrono::milliseconds)
template<>
std::string | duration_unit (std::chrono::seconds)
template<>
std::string | duration_unit (std::chrono::minutes)
template<>
std::string | duration_unit (std::chrono::hours)

## Detailed Description

Helpers to stream duration objects with proper units.

This will become obsolete with C++20: https://en.cppreference.com/w/cpp/chrono/duration/operator_ltlt

## Function Documentation

## ◆ duration_unit() [1/7]

template<typename T >

std::string std::chrono::io::duration_unit | ( | T |  | ) |
| inline

Return unit of std::chrono::duration.

Definition at line 20 of file ChronoIO.h.

20 {
21 return "";
22 }

## ◆ duration_unit() [2/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::nanoseconds |  | ) |
| inline

Definition at line 26 of file ChronoIO.h.

26 {
27 return "ns";
28 }

## ◆ duration_unit() [3/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::microseconds |  | ) |
| inline

Definition at line 31 of file ChronoIO.h.

31 {
32 return "us";
33 }

## ◆ duration_unit() [4/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::milliseconds |  | ) |
| inline

Definition at line 36 of file ChronoIO.h.

36 {
37 return "ms";
38 }

## ◆ duration_unit() [5/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::seconds |  | ) |
| inline

Definition at line 41 of file ChronoIO.h.

41 {
42 return "s";
43 }

## ◆ duration_unit() [6/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::minutes |  | ) |
| inline

Definition at line 46 of file ChronoIO.h.

46 {
47 return "m";
48 }

## ◆ duration_unit() [7/7]

template<>

std::string std::chrono::io::duration_unit | ( | std::chrono::hours |  | ) |
| inline

Definition at line 51 of file ChronoIO.h.

51 {
52 return "h";
53 }