|
iceoryx_doc
1.0.1
|
#include <duration.hpp>
Public Member Functions | |
| constexpr | Duration (const struct timeval &value) noexcept |
| Construct a Duration object from timeval. More... | |
| constexpr | Duration (const struct timespec &value) noexcept |
| Construct a Duration object from timespec. More... | |
| constexpr | Duration (const struct itimerspec &value) noexcept |
| Construct a Duration object from itimerspec. More... | |
| constexpr | Duration (const std::chrono::milliseconds &value) noexcept |
| Construct a Duration object from std::chrono::milliseconds. More... | |
| constexpr | Duration (const std::chrono::nanoseconds &value) noexcept |
| Construct a Duration object from std::chrono::nanoseconds. More... | |
| Duration & | operator= (const std::chrono::milliseconds &rhs) noexcept |
| Assigns a std::chrono::milliseconds to an duration object. More... | |
| constexpr bool | operator== (const Duration &rhs) const noexcept |
| Equal to operator. More... | |
| constexpr bool | operator!= (const Duration &rhs) const noexcept |
| Not equal to operator. More... | |
| constexpr bool | operator< (const Duration &rhs) const noexcept |
| Less than operator. More... | |
| constexpr bool | operator<= (const Duration &rhs) const noexcept |
| Less than or equal to operator. More... | |
| constexpr bool | operator> (const Duration &rhs) const noexcept |
| Greater than operator. More... | |
| constexpr bool | operator>= (const Duration &rhs) const noexcept |
| Greater than or equal to operator. More... | |
| constexpr Duration | operator+ (const Duration &rhs) const noexcept |
| Creates Duration object by addition. More... | |
| constexpr Duration | operator- (const Duration &rhs) const noexcept |
| Creates Duration object by subtraction. More... | |
| template<typename T > | |
| constexpr Duration | operator* (const T &rhs) const noexcept |
| Creates Duration object by multiplication. More... | |
| constexpr uint64_t | toNanoseconds () const noexcept |
| returns the duration in nanoseconds More... | |
| constexpr uint64_t | toMicroseconds () const noexcept |
| returns the duration in microseconds More... | |
| constexpr uint64_t | toMilliseconds () const noexcept |
| returns the duration in milliseconds More... | |
| constexpr uint64_t | toSeconds () const noexcept |
| returns the duration in seconds More... | |
| constexpr uint64_t | toMinutes () const noexcept |
| returns the duration in minutes More... | |
| constexpr uint64_t | toHours () const noexcept |
| returns the duration in hours More... | |
| constexpr uint64_t | toDays () const noexcept |
| returns the duration in days More... | |
| struct timespec | timespec (const TimeSpecReference &reference=TimeSpecReference::None) const noexcept |
| converts duration in a timespec c struct | |
| constexpr | operator struct timeval () const noexcept |
| converts duration in a timeval c struct timeval::tv_sec = seconds since the Epoch (01.01.1970) timeval::tv_usec = microseconds | |
Static Public Member Functions | |
| template<typename T > | |
| static constexpr Duration | fromNanoseconds (const T value) noexcept |
| Constructs a new Duration object from nanoseconds. More... | |
| template<typename T > | |
| static constexpr Duration | fromMicroseconds (const T value) noexcept |
| Constructs a new Duration object from microseconds. More... | |
| template<typename T > | |
| static constexpr Duration | fromMilliseconds (const T value) noexcept |
| Constructs a new Duration object from milliseconds. More... | |
| template<typename T > | |
| static constexpr Duration | fromSeconds (const T value) noexcept |
| Constructs a new Duration object from seconds. More... | |
| template<typename T > | |
| static constexpr Duration | fromMinutes (const T value) noexcept |
| Constructs a new Duration object from minutes. More... | |
| template<typename T > | |
| static constexpr Duration | fromHours (const T value) noexcept |
| Constructs a new Duration object from hours. More... | |
| template<typename T > | |
| static constexpr Duration | fromDays (const T value) noexcept |
| Constructs a new Duration object from days. More... | |
Protected Types | |
| using | Seconds_t = uint64_t |
| using | Nanoseconds_t = uint32_t |
Protected Member Functions | |
| constexpr | Duration (const Seconds_t seconds, const Nanoseconds_t nanoseconds) noexcept |
| Constructs a Duration from seconds and nanoseconds. More... | |
Static Protected Member Functions | |
| static constexpr Duration | createDuration (const Seconds_t seconds, const Nanoseconds_t nanoseconds) noexcept |
| static constexpr Duration | max () noexcept |
| static constexpr Duration | zero () noexcept |
Friends | |
| constexpr friend Duration | duration_literals::operator""_ns (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_us (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_ms (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_s (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_m (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_h (unsigned long long int) noexcept |
| constexpr friend Duration | duration_literals::operator""_d (unsigned long long int) noexcept |
| template<typename T > | |
| constexpr friend Duration | operator* (const T &lhs, const Duration &rhs) noexcept |
| creates Duration object by multiplying object T with a duration More... | |
| std::ostream & | operator<< (std::ostream &stream, const Duration &t) noexcept |
| stream operator for the Duration class | |
|
inlineexplicitconstexprnoexcept |
Construct a Duration object from timeval.
| [in] | value | as timeval |
|
inlineexplicitconstexprnoexcept |
Construct a Duration object from timespec.
| [in] | value | as timespec |
|
inlineexplicitconstexprnoexcept |
Construct a Duration object from itimerspec.
| [in] | value | as itimerspec |
|
inlineexplicitconstexprnoexcept |
Construct a Duration object from std::chrono::milliseconds.
| [in] | value | as milliseconds |
|
inlineexplicitconstexprnoexcept |
Construct a Duration object from std::chrono::nanoseconds.
| [in] | value | as nanoseconds |
|
inlineconstexprprotectednoexcept |
|
inlinestaticconstexprprotectednoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
staticconstexprnoexcept |
|
inlineconstexprnoexcept |
Not equal to operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlineconstexprnoexcept |
Creates Duration object by multiplication.
| T | is an arithmetic type for the multiplicator |
| [in] | rhs | is the multiplicator |
|
inlineconstexprnoexcept |
Less than operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlineconstexprnoexcept |
Less than or equal to operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlinenoexcept |
Assigns a std::chrono::milliseconds to an duration object.
| [in] | rhs | is the right hand side of the assignment |
|
inlineconstexprnoexcept |
Equal to operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlineconstexprnoexcept |
Greater than operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlineconstexprnoexcept |
Greater than or equal to operator.
| [in] | rhs | is the right hand side of the comparison |
|
inlineconstexprnoexcept |
returns the duration in days
|
inlineconstexprnoexcept |
returns the duration in hours
|
inlineconstexprnoexcept |
returns the duration in microseconds
|
inlineconstexprnoexcept |
returns the duration in milliseconds
|
inlineconstexprnoexcept |
returns the duration in minutes
|
inlineconstexprnoexcept |
returns the duration in nanoseconds
|
inlineconstexprnoexcept |
returns the duration in seconds
|
friend |
creates Duration object by multiplying object T with a duration
| T | is an arithmetic type for the multiplicator |
| [in] | lhs | is the multiplicator |
| [in] | rhs | is the multiplicant |