|
| | Timespan () noexcept |
| | Initialize timespan with a zero time duration.
|
| |
| | Timespan (int64_t duration) noexcept |
| | Initialize timespan with a given time duration value in nanoseconds.
|
| |
| template<class Rep , class Period > |
| | Timespan (const std::chrono::duration< Rep, Period > &duration) noexcept |
| | Initialize timespan with a given std::chrono duration.
|
| |
| | Timespan (const Timespan &) noexcept=default |
| |
| | Timespan (Timespan &&) noexcept=default |
| |
| | ~Timespan () noexcept=default |
| |
| Timespan & | operator= (int64_t duration) noexcept |
| |
| Timespan & | operator= (const Timespan &) noexcept=default |
| |
| Timespan & | operator= (Timespan &&) noexcept=default |
| |
| Timespan | operator+ () const |
| |
| Timespan | operator- () const |
| |
| Timespan & | operator+= (int64_t offset) noexcept |
| |
| Timespan & | operator+= (const Timespan &offset) noexcept |
| |
| Timespan & | operator-= (int64_t offset) noexcept |
| |
| Timespan & | operator-= (const Timespan &offset) noexcept |
| |
| std::chrono::system_clock::duration | chrono () const noexcept |
| | Convert timespan to the std::chrono nanoseconds duration.
|
| |
| int64_t | days () const noexcept |
| | Get total days of the current timespan.
|
| |
| int64_t | hours () const noexcept |
| | Get total hours of the current timespan.
|
| |
| int64_t | minutes () const noexcept |
| | Get total minutes of the current timespan.
|
| |
| int64_t | seconds () const noexcept |
| | Get total seconds of the current timespan.
|
| |
| int64_t | milliseconds () const noexcept |
| | Get total milliseconds of the current timespan.
|
| |
| int64_t | microseconds () const noexcept |
| | Get total microseconds of the current timespan.
|
| |
| int64_t | nanoseconds () const noexcept |
| | Get total nanoseconds of the current timespan.
|
| |
| int64_t | total () const noexcept |
| | Get total value of the current timespan (total nanoseconds)
|
| |
| void | swap (Timespan ×pan) noexcept |
| | Swap two instances.
|
| |
|
| static Timespan | days (int64_t days) noexcept |
| | Create the timespan based on the given days value.
|
| |
| static Timespan | hours (int64_t hours) noexcept |
| | Create the timespan based on the given hours value.
|
| |
| static Timespan | minutes (int64_t minutes) noexcept |
| | Create the timespan based on the given minutes value.
|
| |
| static Timespan | seconds (int64_t seconds) noexcept |
| | Create the timespan based on the given seconds value.
|
| |
| static Timespan | milliseconds (int64_t milliseconds) noexcept |
| | Create the timespan based on the given milliseconds value.
|
| |
| static Timespan | microseconds (int64_t microseconds) noexcept |
| | Create the timespan based on the given microseconds value.
|
| |
| static Timespan | nanoseconds (int64_t nanoseconds) noexcept |
| | Create the timespan based on the given nanoseconds value.
|
| |
| static Timespan | zero () noexcept |
| | Get zero timespan.
|
| |
|
| Timespan | operator+ (const Timespan ×pan, int64_t offset) noexcept |
| |
| Timespan | operator+ (int64_t offset, const Timespan ×pan) noexcept |
| |
| Timespan | operator+ (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| Timespan | operator- (const Timespan ×pan, int64_t offset) noexcept |
| |
| Timespan | operator- (int64_t offset, const Timespan ×pan) noexcept |
| |
| Timespan | operator- (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator== (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator== (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator== (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator!= (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator!= (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator!= (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator> (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator> (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator> (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator< (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator< (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator< (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator>= (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator>= (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator>= (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| bool | operator<= (const Timespan ×pan, int64_t offset) noexcept |
| |
| bool | operator<= (int64_t offset, const Timespan ×pan) noexcept |
| |
| bool | operator<= (const Timespan ×pan1, const Timespan ×pan2) noexcept |
| |
| void | swap (Timespan ×pan1, Timespan ×pan2) noexcept |
| |
Timespan.
Timespan wraps time duration in nanoseconds or difference between two timestamps and allows to get separate values of days, hours, minutes, seconds, milliseconds, microseconds or nanoseconds.
Not thread-safe.
- Examples
- time_timespan.cpp.
Definition at line 26 of file timespan.h.