Convenient wrapper around struct
timespec
that contains a time interval.
More...
#include <time.h>
|
static long const | BILLION = 1000000000L |
|
Convenient wrapper around struct
timespec
that contains a time interval.
- Examples
- 5_perf.cpp, daemon_pattern.cpp, and measure.cpp.
Definition at line 52 of file time.h.
◆ TimeInterval() [1/8]
constexpr zth::TimeInterval::TimeInterval |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ TimeInterval() [2/8]
constexpr zth::TimeInterval::TimeInterval |
( |
time_t |
s, |
|
|
long |
ns = 0 , |
|
|
bool |
negative = false |
|
) |
| |
|
inlineconstexprnoexcept |
◆ TimeInterval() [3/8]
constexpr zth::TimeInterval::TimeInterval |
( |
struct timespec const & |
ts | ) |
|
|
inlineconstexprnoexcept |
◆ TimeInterval() [4/8]
constexpr zth::TimeInterval::TimeInterval |
( |
TimeInterval const & |
t | ) |
|
|
inlineconstexprnoexcept |
◆ TimeInterval() [5/8]
zth::TimeInterval::TimeInterval |
( |
float |
dt | ) |
|
|
inline |
◆ TimeInterval() [6/8]
zth::TimeInterval::TimeInterval |
( |
double |
dt | ) |
|
|
inline |
◆ TimeInterval() [7/8]
zth::TimeInterval::TimeInterval |
( |
long double |
dt | ) |
|
|
inline |
◆ TimeInterval() [8/8]
template<typename T >
constexpr zth::TimeInterval::TimeInterval |
( |
T |
dt | ) |
|
|
inlineconstexprnoexcept |
◆ add()
constexpr void zth::TimeInterval::add |
( |
TimeInterval const & |
t | ) |
|
|
inlineconstexprnoexcept |
◆ from_ms()
template<typename T >
static constexpr TimeInterval zth::TimeInterval::from_ms |
( |
T |
ms | ) |
|
|
inlinestaticconstexpr |
◆ from_ns()
template<typename T >
static constexpr TimeInterval zth::TimeInterval::from_ns |
( |
T |
ns | ) |
|
|
inlinestaticconstexpr |
◆ from_s()
template<typename T >
static constexpr TimeInterval zth::TimeInterval::from_s |
( |
T |
s | ) |
|
|
inlinestaticconstexpr |
◆ from_us()
template<typename T >
static constexpr TimeInterval zth::TimeInterval::from_us |
( |
T |
us | ) |
|
|
inlinestaticconstexpr |
◆ hasPassed()
constexpr bool zth::TimeInterval::hasPassed |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ infinity()
constexpr static TimeInterval zth::TimeInterval::infinity |
( |
| ) |
|
|
inlinestaticconstexprnoexcept |
◆ isAbsBiggerThan()
constexpr bool zth::TimeInterval::isAbsBiggerThan |
( |
TimeInterval const & |
t | ) |
const |
|
inlineconstexprnoexcept |
◆ isBiggerThan()
constexpr bool zth::TimeInterval::isBiggerThan |
( |
TimeInterval const & |
t | ) |
const |
|
inlineconstexprnoexcept |
◆ isInfinite()
constexpr bool zth::TimeInterval::isInfinite |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ isNegative()
constexpr bool zth::TimeInterval::isNegative |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ isNormal()
constexpr bool zth::TimeInterval::isNormal |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ isNull()
constexpr bool zth::TimeInterval::isNull |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ isPositive()
constexpr bool zth::TimeInterval::isPositive |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ mul()
template<typename T >
constexpr void zth::TimeInterval::mul |
( |
T |
x | ) |
|
|
inlineconstexprnoexcept |
◆ null()
|
inlinestaticconstexprnoexcept |
◆ operator*()
template<typename T >
constexpr TimeInterval zth::TimeInterval::operator* |
( |
T |
x | ) |
const |
|
inlineconstexprnoexcept |
◆ operator*=()
template<typename T >
constexpr TimeInterval& zth::TimeInterval::operator*= |
( |
T |
x | ) |
|
|
inlineconstexprnoexcept |
◆ operator+()
◆ operator+=()
◆ operator-() [1/2]
constexpr TimeInterval zth::TimeInterval::operator- |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator-() [2/2]
◆ operator-=()
◆ operator/()
template<typename T >
constexpr TimeInterval zth::TimeInterval::operator/ |
( |
T |
x | ) |
const |
|
inlineconstexprnoexcept |
◆ operator/=()
template<typename T >
constexpr TimeInterval& zth::TimeInterval::operator/= |
( |
T |
x | ) |
|
|
inlineconstexprnoexcept |
◆ operator<()
constexpr bool zth::TimeInterval::operator< |
( |
TimeInterval const & |
rhs | ) |
const |
|
inlineconstexprnoexcept |
◆ operator<=()
constexpr bool zth::TimeInterval::operator<= |
( |
TimeInterval const & |
rhs | ) |
const |
|
inlineconstexprnoexcept |
◆ operator=()
◆ operator==()
constexpr bool zth::TimeInterval::operator== |
( |
TimeInterval const & |
rhs | ) |
const |
|
inlineconstexprnoexcept |
◆ operator>()
constexpr bool zth::TimeInterval::operator> |
( |
TimeInterval const & |
rhs | ) |
const |
|
inlineconstexprnoexcept |
◆ operator>=()
constexpr bool zth::TimeInterval::operator>= |
( |
TimeInterval const & |
rhs | ) |
const |
|
inlineconstexprnoexcept |
◆ s() [1/2]
constexpr double zth::TimeInterval::s |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ s() [2/2]
template<typename T >
constexpr T zth::TimeInterval::s |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ str()
string zth::TimeInterval::str |
( |
| ) |
const |
|
inline |
◆ sub()
constexpr void zth::TimeInterval::sub |
( |
TimeInterval const & |
t | ) |
|
|
inlineconstexprnoexcept |
◆ ts()
constexpr struct timespec const& zth::TimeInterval::ts |
( |
| ) |
const |
|
inlinenoexcept |
◆ BILLION
long const zth::TimeInterval::BILLION = 1000000000L |
|
static |
The documentation for this class was generated from the following file: