Loading...
Searching...
No Matches
time_point.h File Reference

Go to the source code of this file.

## Classes

class | etl::chrono::time_point< TClock, TDuration >
struct | etl::common_type< etl::chrono::time_point< TClock, TDuration1 >, etl::chrono::time_point< TClock, TDuration2 > >
| Spaceship operator. More...

## Namespaces

namespace | etl

## Functions

template<typename TToDuration, typename TClock, typename TDuration>
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > | etl::chrono::floor (const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
| Rounds down a duration to the nearest lower precision.
template<typename TToDuration, typename TClock, typename TDuration>
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > | etl::chrono::ceil (const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
| Rounds up a duration to the nearest higher precision.
template<typename TToDuration, typename TClock, typename TDuration>
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > | etl::chrono::round (const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
template<typename TToDuration, typename TClock, typename TDuration>
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > | etl::chrono::time_point_cast (const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
template<typename TClock, typename TDuration1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< TDuration1, etl::chrono::duration< TRep2, TPeriod2 > >::type > | etl::chrono::operator+ (const time_point< TClock, TDuration1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
template<typename TRep1, typename TPeriod1, typename TClock, typename TDuration2>
ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, TDuration2 >::type > | etl::chrono::operator+ (const etl::chrono::duration< TRep1, TPeriod1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
template<typename TClock, typename TDuration1, typename TRep2, typename TPeriod2>
ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< TDuration1, etl::chrono::duration< TRep2, TPeriod2 > >::type > | etl::chrono::operator- (const time_point< TClock, TDuration1 > &lhs, const etl::chrono::duration< TRep2, TPeriod2 > &rhs) ETL_NOEXCEPT
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 etl::common_type< TDuration1, TDuration2 >::type | etl::chrono::operator- (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator== (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Equality operator.
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator!= (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Inequality operator.
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator< (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Less-than operator.
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator<= (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Less-than-equal operator.
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator> (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Greater-than operator.
template<typename TClock, typename TDuration1, typename TDuration2>
ETL_CONSTEXPR14 bool | etl::chrono::operator>= (const time_point< TClock, TDuration1 > &lhs, const time_point< TClock, TDuration2 > &rhs) ETL_NOEXCEPT
| Greater-than-equal operator.

## Function Documentation

## operator+() [1/2]

template<typename TRep1, typename TPeriod1, typename TClock, typename TDuration2>

ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< etl::chrono::duration< TRep1, TPeriod1 >, TDuration2 >::type > etl::chrono::operator+ | ( | const etl::chrono::duration< TRep1, TPeriod1 > & | lhs,
|  | const time_point< TClock, TDuration2 > & | rhs )

Adds a time_point to a duration. Returns a time_point whose duration is the common type of the two.

## operator+() [2/2]

template<typename TClock, typename TDuration1, typename TRep2, typename TPeriod2>

ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< TDuration1, etl::chrono::duration< TRep2, TPeriod2 > >::type > etl::chrono::operator+ | ( | const time_point< TClock, TDuration1 > & | lhs,
|  | const etl::chrono::duration< TRep2, TPeriod2 > & | rhs )

Adds a duration to a time_point. Returns a time_point whose duration is the common type of the two.

## operator-() [1/2]

template<typename TClock, typename TDuration1, typename TRep2, typename TPeriod2>

ETL_CONSTEXPR14 etl::chrono::time_point< TClock, typename etl::common_type< TDuration1, etl::chrono::duration< TRep2, TPeriod2 > >::type > etl::chrono::operator- | ( | const time_point< TClock, TDuration1 > & | lhs,
|  | const etl::chrono::duration< TRep2, TPeriod2 > & | rhs )

Subtracts a duration from a time_point. Returns a time_point whose duration is the common type of the two.

## operator-() [2/2]

template<typename TClock, typename TDuration1, typename TDuration2>

ETL_CONSTEXPR14 etl::common_type< TDuration1, TDuration2 >::type etl::chrono::operator- | ( | const time_point< TClock, TDuration1 > & | lhs,
|  | const time_point< TClock, TDuration2 > & | rhs )

Subtracts one time_point from another. Returns the duration between them as the common type of the two durations.

## round()

template<typename TToDuration, typename TClock, typename TDuration>

ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > etl::chrono::round | ( | const etl::chrono::time_point< TClock, TDuration > & | tp | ) |

Rounds a duration to the nearest precision. If the duration is exactly halfway, it rounds away from zero.