Embedded Template Library 1.0
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
 bitset_ext

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 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

◆ 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.