|
constexpr | Duration ()=default |
|
template<class Rep2 > |
constexpr | Duration (const Rep2 &rep) |
| Construct from repetition. More...
|
|
template<class Rep2 , class Period2 , class Ratio = typename Period2::template div<Period>::type> |
constexpr | Duration (const Duration< Rep2, Period2 > &d) |
| Construct from another type of duration. More...
|
|
template<class Rep2 , class Period2 , class Ratio = typename Period2::template div<Period>::type> |
Duration & | operator= (const Duration< Rep2, Period2 > &rhs) |
|
constexpr Duration | operator+ () const |
|
Duration & | operator++ () |
|
Duration | operator++ (int) const |
|
Duration & | operator+= (const Duration &rhs) |
|
constexpr Duration | operator- () const |
|
Duration & | operator-- () |
|
Duration | operator-- (int) const |
|
Duration & | operator-= (const Duration &rhs) |
|
Duration & | operator*= (const Rep &rhs) |
|
Duration & | operator/= (const Rep &rhs) |
|
Duration & | operator%= (const Rep &rhs) |
|
Duration & | operator%= (const Duration &rhs) |
|
template<class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration, Duration<Rep2,Period2>>::type> |
constexpr bool | operator== (const Duration< Rep2, Period2 > &rhs) const |
|
template<class Rep2 , class Period2 > |
constexpr bool | operator!= (const Duration< Rep2, Period2 > &rhs) const |
|
template<class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration, Duration<Rep2,Period2>>::type> |
constexpr bool | operator< (const Duration< Rep2, Period2 > &rhs) const |
|
template<class Rep2 , class Period2 > |
constexpr bool | operator> (const Duration< Rep2, Period2 > &rhs) const |
|
template<class Rep2 , class Period2 > |
constexpr bool | operator<= (const Duration< Rep2, Period2 > &rhs) const |
|
template<class Rep2 , class Period2 > |
constexpr bool | operator>= (const Duration< Rep2, Period2 > &rhs) const |
|
constexpr Rep | count () const |
| Get number of repetitions of period. More...
|
|
|
(Note that these are not member functions.)
|
|
typedef Duration< int64, ratio::Nano > | Nanosec |
|
typedef Duration< int64, ratio::Micro > | Microsec |
|
typedef Duration< int64, ratio::Milli > | Millisec |
|
typedef Duration< int64, ratio::Unit > | Seconds |
|
typedef Duration< int, Seconds::Period::mul< Ratio< 60 > >::type > | Minutes |
|
typedef Duration< int, Minutes::Period::mul< Ratio< 60 > >::type > | Hours |
|
typedef Duration< int, Hours::Period::mul< Ratio< 24 > >::type > | Days |
|
|
template<class Rep , class Period , class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration<Rep,Period>, Duration<Rep2,Period2>>::type> |
constexpr DurCommon | operator+ (const Duration< Rep, Period > &lhs, const Duration< Rep2, Period2 > &rhs) |
| operator+(Duration, Duration). Returns a duration with best-fit period and repetition types. More...
|
|
template<class Rep , class Period , class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration<Rep,Period>, Duration<Rep2,Period2>>::type> |
constexpr DurCommon | operator- (const Duration< Rep, Period > &lhs, const Duration< Rep2, Period2 > &rhs) |
| operator-(Duration, Duration). Returns a duration with best-fit period and repetition types. More...
|
|
template<class Rep , class Period , class Rep2 , class DurCommon = Duration<typename std::common_type<Rep,Rep2>::type, Period>> |
constexpr DurCommon | operator* (const Duration< Rep, Period > &lhs, const Rep2 &rhs) |
| operator*(Duration, Rep). Returns a duration of best-fit period and repetition types. More...
|
|
template<class Rep , class Rep2 , class Period , class DurCommon = Duration<typename std::common_type<Rep,Rep2>::type, Period>> |
constexpr DurCommon | operator* (const Rep &lhs, const Duration< Rep2, Period > &rhs) |
| operator*(Rep, Duration). Returns a duration of best-fit period and repetition types. More...
|
|
template<class Rep , class Period , class Rep2 , typename mt::disable_if< mt::isSpecializationOf< Rep2, Duration >::value, int >::type = 0, class DurCommon = Duration<typename std::common_type<Rep,Rep2>::type, Period>> |
constexpr DurCommon | operator/ (const Duration< Rep, Period > &lhs, const Rep2 &rhs) |
| operator/(Duration, Rep). Returns a duration of best-fit period and repetition types. More...
|
|
template<class Rep , class Period , class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration<Rep,Period>, Duration<Rep2,Period2>>::type, class RepCommon = typename std::common_type<Rep,Rep2>::type> |
constexpr RepCommon | operator/ (const Duration< Rep, Period > &lhs, const Duration< Rep2, Period2 > &rhs) |
| operator/(Duration, Duration). Returns a repetition of best-fit type. More...
|
|
template<class Rep , class Period , class Rep2 , typename mt::disable_if< mt::isSpecializationOf< Rep2, Duration >::value, int >::type = 0, class DurCommon = Duration<typename std::common_type<Rep,Rep2>::type, Period>> |
constexpr DurCommon | operator% (const Duration< Rep, Period > &lhs, const Rep2 &rhs) |
| operator%(Duration, Rep). Returns a duration of best-fit period and repetition types. More...
|
|
template<class Rep , class Period , class Rep2 , class Period2 , class DurCommon = typename std::common_type<Duration<Rep,Period>, Duration<Rep2,Period2>>::type> |
constexpr DurCommon | operator% (const Duration< Rep, Period > &lhs, const Duration< Rep2, Period2 > &rhs) |
| operator%(Duration, Duration). Returns a duration of best-fit period and repetition types. More...
|
|
|
constexpr Nanosec | operator""_ns (unsigned long long int n) |
| Construct Nanosec from integer literal (eg. 100_ns) More...
|
|
constexpr Microsec | operator""_us (unsigned long long int n) |
| Construct Microsec from integer literal. More...
|
|
constexpr Millisec | operator""_ms (unsigned long long int n) |
| Construct Millisec from integer literal. More...
|
|
constexpr Seconds | operator""_s (unsigned long long int n) |
| Construct Seconds from integer literal. More...
|
|
constexpr Minutes | operator""_min (unsigned long long int n) |
| Construct Minutes from integer literal. More...
|
|
constexpr Hours | operator""_h (unsigned long long int n) |
| Construct Hours from integer literal. More...
|
|
template<class Rep_, class Period_ = Ratio<1>>
class honey::Duration< Rep_, Period_ >
Duration represented by repetitions of a period. The period must be a ratio.