The Gaudi Framework
v36r16 (ea80daf8)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
r
s
t
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
ChronoIO.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <chrono>
14
#include <iostream>
15
16
#if __cplusplus <= 201703L
17
18
namespace
std
{
19
namespace
chrono {
20
27
namespace
io {
29
template
<
typename
T>
30
inline
std::string
duration_unit
( T ) {
31
return
""
;
32
}
33
34
// template specializations for units of time
35
template
<>
36
inline
std::string
duration_unit
(
std::chrono::nanoseconds
) {
37
return
"ns"
;
38
}
39
40
template
<>
41
inline
std::string
duration_unit
(
std::chrono::microseconds
) {
42
return
"us"
;
43
}
44
45
template
<>
46
inline
std::string
duration_unit
(
std::chrono::milliseconds
) {
47
return
"ms"
;
48
}
49
50
template
<>
51
inline
std::string
duration_unit
(
std::chrono::seconds
) {
52
return
"s"
;
53
}
54
55
template
<>
56
inline
std::string
duration_unit
(
std::chrono::minutes
) {
57
return
"m"
;
58
}
59
60
template
<>
61
inline
std::string
duration_unit
(
std::chrono::hours
) {
62
return
"h"
;
63
}
64
}
// namespace io
65
67
template
<
class
Rep,
class
Period>
68
std::ostream
&
operator<<
(
std::ostream
& os,
const
duration<Rep, Period>
& d ) {
69
os << d.
count
() <<
io::duration_unit
( d );
70
return
os;
71
}
72
}
// namespace chrono
73
}
// namespace std
74
75
#endif // C++17
std::chrono::io::duration_unit
std::string duration_unit(T)
Return unit of std::chrono::duration.
Definition:
ChronoIO.h:30
std::string
STL class.
std::chrono::nanoseconds
std::ostream
STL class.
std::chrono::operator<<
std::ostream & operator<<(std::ostream &os, const duration< Rep, Period > &d)
stream operator for std::chrono::duration including unit
Definition:
ChronoIO.h:68
std
STL namespace.
std::chrono::duration::count
T count(T... args)
GaudiKernel
include
Gaudi
Chrono
ChronoIO.h
Generated on Fri Jul 28 2023 16:22:55 for The Gaudi Framework by
1.8.18