Skip to content

iox::units🔗

Namespaces🔗

Name
iox::units::duration_literals

Classes🔗

Name
class iox::units::Duration

Types🔗

Name
enum TimeSpecReference

Functions🔗

Name
constexpr Duration operator""_ns(unsigned long long int )
Constructs a new Duration object from nanoseconds.
constexpr Duration operator""_us(unsigned long long int )
Constructs a new Duration object from microseconds.
constexpr Duration operator""_ms(unsigned long long int )
Constructs a new Duration object from milliseconds.
constexpr Duration operator""_s(unsigned long long int )
Constructs a new Duration object from seconds.
constexpr Duration operator""_m(unsigned long long int )
Constructs a new Duration object from minutes.
constexpr Duration operator""_h(unsigned long long int )
Constructs a new Duration object from hours.
constexpr Duration operator""_d(unsigned long long int )
Constructs a new Duration object from days.
template \<typename T >
constexpr Duration
operator*(const T & lhs, const Duration & rhs)
creates Duration object by multiplying object T with a duration
std::ostream & operator<<(std::ostream & stream, const Duration & t)
stream operator for the Duration class
constexpr Duration operator""_ns(unsigned long long int value)
Constructs a new Duration object from nanoseconds.
constexpr Duration operator""_us(unsigned long long int value)
Constructs a new Duration object from microseconds.
constexpr Duration operator""_ms(unsigned long long int value)
Constructs a new Duration object from milliseconds.
constexpr Duration operator""_s(unsigned long long int value)
Constructs a new Duration object from seconds.
constexpr Duration operator""_m(unsigned long long int value)
Constructs a new Duration object from minutes.
constexpr Duration operator""_h(unsigned long long int value)
Constructs a new Duration object from hours.
constexpr Duration operator""_d(unsigned long long int value)
Constructs a new Duration object from days.

Types Documentation🔗

enum TimeSpecReference🔗

Enumerator Value Description
None
Epoch
Monotonic

Functions Documentation🔗

function operator""_ns🔗

inline constexpr Duration operator""_ns(
    unsigned long long int 
)

Constructs a new Duration object from nanoseconds.

function operator""_us🔗

inline constexpr Duration operator""_us(
    unsigned long long int 
)

Constructs a new Duration object from microseconds.

function operator""_ms🔗

inline constexpr Duration operator""_ms(
    unsigned long long int 
)

Constructs a new Duration object from milliseconds.

function operator""_s🔗

inline constexpr Duration operator""_s(
    unsigned long long int 
)

Constructs a new Duration object from seconds.

Todo#607 issue warning or fail

function operator""_m🔗

inline constexpr Duration operator""_m(
    unsigned long long int 
)

Constructs a new Duration object from minutes.

Todo#607 issue warning or fail

function operator""_h🔗

inline constexpr Duration operator""_h(
    unsigned long long int 
)

Constructs a new Duration object from hours.

Todo#607 issue warning or fail

function operator""_d🔗

inline constexpr Duration operator""_d(
    unsigned long long int 
)

Constructs a new Duration object from days.

Todo#607 issue warning or fail

function operator*🔗

template <typename T >
inline constexpr Duration operator*(
    const T & lhs,
    const Duration & rhs
)

creates Duration object by multiplying object T with a duration

Parameters:

  • lhs is the multiplicator
  • rhs is the multiplicant

Template Parameters:

  • T is an arithmetic type for the multiplicator

Return: a new Duration object

Attention: Since negative durations are not allowed, the duration will be clamped to 0

function operator<<🔗

std::ostream & operator<<(
    std::ostream & stream,
    const Duration & t
)

stream operator for the Duration class

function operator""_ns🔗

inline constexpr Duration operator""_ns(
    unsigned long long int value
)

Constructs a new Duration object from nanoseconds.

function operator""_us🔗

inline constexpr Duration operator""_us(
    unsigned long long int value
)

Constructs a new Duration object from microseconds.

function operator""_ms🔗

inline constexpr Duration operator""_ms(
    unsigned long long int value
)

Constructs a new Duration object from milliseconds.

function operator""_s🔗

inline constexpr Duration operator""_s(
    unsigned long long int value
)

Constructs a new Duration object from seconds.

Todo#607 issue warning or fail

function operator""_m🔗

inline constexpr Duration operator""_m(
    unsigned long long int value
)

Constructs a new Duration object from minutes.

Todo#607 issue warning or fail

function operator""_h🔗

inline constexpr Duration operator""_h(
    unsigned long long int value
)

Constructs a new Duration object from hours.

Todo#607 issue warning or fail

function operator""_d🔗

inline constexpr Duration operator""_d(
    unsigned long long int value
)

Constructs a new Duration object from days.

Todo#607 issue warning or fail


Updated on 31 May 2022 at 15:29:15 CEST