Loading...
Searching...
No Matches
duration.h File Reference
`#include "../../limits.h"`
`#include "../../ratio.h"`
`#include "../../static_assert.h"`
`#include "../../type_traits.h"`
`#include <string.h>`

Go to the source code of this file.

## Classes

struct | etl::chrono::private_chrono::gcd< Value1, Value2 >
struct | etl::chrono::private_chrono::gcd< Value1, 0 >
struct | etl::chrono::private_chrono::lcm< Value1, Value2 >
struct | etl::chrono::duration_values< TRep >
| duration_values More...
class | etl::chrono::duration< TRep, TPeriod >
| duration More...
struct | etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, etl::chrono::duration< TRep2, TPeriod2 > >
| Hash function for etl::chrono::duration. More...

## Namespaces

namespace | etl

## Typedefs

using | etl::chrono::nanoseconds = etl::chrono::duration<int64_t, etl::nano>
| Duration types.
using | etl::chrono::microseconds = etl::chrono::duration<int64_t, etl::micro>
using | etl::chrono::milliseconds = etl::chrono::duration<int64_t, etl::milli>
using | etl::chrono::seconds = etl::chrono::duration<int64_t, etl::ratio<1U>>
using | etl::chrono::minutes = etl::chrono::duration<int32_t, etl::ratio<60U>>
using | etl::chrono::hours = etl::chrono::duration<int32_t, etl::ratio<3600U>>
using | etl::chrono::days = etl::chrono::duration<int32_t, etl::ratio<86400U>>
using | etl::chrono::weeks = etl::chrono::duration<int32_t, etl::ratio<604800U>>
using | etl::chrono::months = etl::chrono::duration<int32_t, etl::ratio<2629746U>>
using | etl::chrono::years = etl::chrono::duration<int32_t, etl::ratio<31556952U>>

## Functions

template<typename TToDuration, typename TRep, typename TPeriod>
ETL_CONSTEXPR14 TToDuration | etl::chrono::duration_cast (const etl::chrono::duration< TRep, TPeriod > &d) ETL_NOEXCEPT
| duration_cast
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator== (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Check equality.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator!= (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Check inequality.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator< (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Less-than.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator<= (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Less-than-or-equal.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator> (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Greater-than.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 bool | etl::operator>= (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Greater-than-or-equal.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, etl::chrono::duration< TRep2, TPeriod2 > >::type | etl::operator+ (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Spaceship operator.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, etl::chrono::duration< TRep2, TPeriod2 > >::type | etl::operator- (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Operator -.
template<typename TRep1, typename TPeriod1, typename TRep2>
ETL_CONSTEXPR14 enable_if<!etl::is_specialization< TRep2, etl::chrono::duration >::value, etl::chrono::duration< typenameetl::common_type< TRep1, TRep2 >::type, TPeriod1 > >::type | etl::operator* (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
| Operator *.
template<typename TRep1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::chrono::duration< typename etl::common_type< TRep1, TRep2 >::type, TPeriod2 > | etl::operator* (const TRep1 &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Operator *.
template<typename TRep1, typename TPeriod1, typename TRep2>
ETL_CONSTEXPR14 enable_if<!etl::is_specialization< TRep2, etl::chrono::duration >::value, etl::chrono::duration< typenameetl::common_type< TRep1, TRep2 >::type, TPeriod1 > >::type | etl::operator/ (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
| Operator /.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::common_type< TRep1, TRep2 >::type | etl::operator/ (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Operator /.
template<typename TRep1, typename TPeriod1, typename TRep2>
ETL_CONSTEXPR14 etl::chrono::duration< typename etl::common_type< TRep1, TRep2 >::type, TPeriod1 > | etl::operator% (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const TRep2 &rhs) ETL_NOEXCEPT
| Operator %.
template<typename TRep1, typename TPeriod1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, etl::chrono::duration< TRep2, TPeriod2 > >::type | etl::operator% (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
| Operator %.
template<typename TToDuration, typename TRep, typename TPeriod>
ETL_CONSTEXPR14 etl::enable_if< etl::is_specialization< TToDuration, etl::chrono::duration >::value, TToDuration >::type | etl::floor (const etl::chrono::duration< TRep, TPeriod > &d) ETL_NOEXCEPT
| Rounds down a duration to the nearest lower precision.
template<typename TToDuration, typename TRep, typename TPeriod>
ETL_CONSTEXPR14 etl::enable_if< etl::is_specialization< TToDuration, etl::chrono::duration >::value, TToDuration >::type | etl::ceil (const etl::chrono::duration< TRep, TPeriod > &d) ETL_NOEXCEPT
| Rounds up a duration to the nearest higher precision.
template<typename TToDuration, typename TRep, typename TPeriod>
ETL_CONSTEXPR14 etl::enable_if< etl::is_specialization< TToDuration, etl::chrono::duration >::value, TToDuration >::type | etl::round (const etl::chrono::duration< TRep, TPeriod > &d) ETL_NOEXCEPT
template<class TRep, class TPeriod, typename = etl::enable_if_t<etl::numeric_limits<TRep>::is_signed>>
ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriod > | etl::abs (etl::chrono::duration< TRep, TPeriod > d) ETL_NOEXCEPT
| Returns the absolute value of a duration.
ETL_CONSTEXPR14 etl::chrono::hours | etl::literals::operator""_h (unsigned long long h) ETL_NOEXCEPT
| Literal for hours duration.
ETL_CONSTEXPR14 etl::chrono::duration< double, ratio< 3600 > > | etl::literals::operator""_h (long double h) ETL_NOEXCEPT
| Literal for floating point hours duration.
ETL_CONSTEXPR14 etl::chrono::minutes | etl::literals::operator""_min (unsigned long long m) ETL_NOEXCEPT
| Literal for minutes duration.
ETL_CONSTEXPR14 etl::chrono::duration< double, ratio< 60 > > | etl::literals::operator""_min (long double m) ETL_NOEXCEPT
| Literal for floating point minutes duration.
ETL_CONSTEXPR14 etl::chrono::seconds | etl::literals::operator""_s (unsigned long long s) ETL_NOEXCEPT
| Literal for seconds duration.
ETL_CONSTEXPR14 etl::chrono::duration< double > | etl::literals::operator""_s (long double s) ETL_NOEXCEPT
| Literal for floating point seconds duration.
ETL_CONSTEXPR14 etl::chrono::milliseconds | etl::literals::operator""_ms (unsigned long long s) ETL_NOEXCEPT
| Literal for milliseconds duration.
ETL_CONSTEXPR14 etl::chrono::duration< double, milli > | etl::literals::operator""_ms (long double s) ETL_NOEXCEPT
| Literal for floating point milliseconds duration.
ETL_CONSTEXPR14 etl::chrono::microseconds | etl::literals::operator""_us (unsigned long long s) ETL_NOEXCEPT
| Literal for microseconds duration.
ETL_CONSTEXPR14 etl::chrono::duration< double, micro > | etl::literals::operator""_us (long double s) ETL_NOEXCEPT
| Literal for floating point microseconds duration.
ETL_CONSTEXPR14 etl::chrono::nanoseconds | etl::literals::operator""_ns (unsigned long long s) ETL_NOEXCEPT
| Literal for nanoseconds duration.
ETL_CONSTEXPR14 etl::chrono::duration< double, nano > | etl::literals::operator""_ns (long double s) ETL_NOEXCEPT
| Literal for floating point nanoseconds duration.