31#ifndef ETL_IN_CHRONO_H
32 #error DO NOT DIRECTLY INCLUDE THIS FILE. USE CHRONO.H
43 template <
typename TClock,
typename TDuration =
typename TClock::duration>
49 using duration = TDuration;
50 using rep =
typename TDuration::rep;
51 using period =
typename TDuration::period;
57 : dur(duration::zero())
64 ETL_CONSTEXPR14
explicit time_point(
const duration& dur_) ETL_NOEXCEPT
80 template <
typename TDuration2>
82 : dur(rhs.time_since_epoch())
167 template <
typename TToDuration,
typename TClock,
typename TDuration>
177 template <
typename TToDuration,
typename TClock,
typename TDuration>
187 template <
typename TToDuration,
typename TClock,
typename TDuration>
194 template <
typename TToDuration,
typename TClock,
typename TDuration>
206 template <
typename TClock,
typename TDuration1,
typename TDuration2>
209 return lhs.time_since_epoch() == rhs.time_since_epoch();
215 template <
typename TClock,
typename TDuration1,
typename TDuration2>
218 return !(lhs == rhs);
224 template <
typename TClock,
typename TDuration1,
typename TDuration2>
227 return lhs.time_since_epoch() < rhs.time_since_epoch();
233 template <
typename TClock,
typename TDuration1,
typename TDuration2>
242 template <
typename TClock,
typename TDuration1,
typename TDuration2>
251 template <
typename TClock,
typename TDuration1,
typename TDuration2>
262 template <
typename TClock,
typename TDuration1,
typename TDuration2>
267 return (lhs.time_since_epoch() <=> rhs.time_since_epoch());
274 template <
typename TClock,
typename TDuration1,
typename TDuration2>
duration
Definition duration.h:108
Definition time_point.h:45
ETL_NODISCARD ETL_CONSTEXPR14 duration time_since_epoch() const ETL_NOEXCEPT
Definition time_point.h:100
ETL_CONSTEXPR14 time_point(const duration &dur_) ETL_NOEXCEPT
Construct from a duration.
Definition time_point.h:64
ETL_CONSTEXPR14 time_point & operator=(const time_point &rhs) ETL_NOEXCEPT
Assignment operator.
Definition time_point.h:89
ETL_CONSTEXPR time_point() ETL_NOEXCEPT
Default constructor.
Definition time_point.h:56
static ETL_NODISCARD ETL_CONSTEXPR14 time_point min() ETL_NOEXCEPT
Returns a time_point with the smallest possible duration.
Definition time_point.h:129
ETL_NODISCARD ETL_CONSTEXPR14 int compare(const time_point &other) const ETL_NOEXCEPT
Definition time_point.h:149
static ETL_NODISCARD ETL_CONSTEXPR14 time_point max() ETL_NOEXCEPT
Returns a time_point with the largest possible duration.
Definition time_point.h:138
ETL_CONSTEXPR14 time_point(const time_point< clock, TDuration2 > &rhs) ETL_NOEXCEPT
Copy construct from another time_point with a different duration type.
Definition time_point.h:81
ETL_CONSTEXPR14 time_point(const time_point &rhs) ETL_NOEXCEPT
Copy constructor.
Definition time_point.h:72
ETL_CONSTEXPR14 time_point & operator-=(const duration &rhs) ETL_NOEXCEPT
Subtracts a duration.
Definition time_point.h:118
ETL_CONSTEXPR14 time_point & operator+=(const duration &rhs) ETL_NOEXCEPT
Adds a duration.
Definition time_point.h:108
ETL_CONSTEXPR14 bool operator<(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Less-than operator.
Definition day.h:182
ETL_CONSTEXPR14 bool operator>=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Greater-than-or-equal operator.
Definition day.h:206
ETL_CONSTEXPR14 bool operator==(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Equality operator.
Definition day.h:166
ETL_CONSTEXPR14 bool operator<=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Less-than-or-equal operator.
Definition day.h:190
ETL_CONSTEXPR14 bool operator!=(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Inequality operator.
Definition day.h:174
ETL_CONSTEXPR14 bool operator>(const etl::chrono::day &d1, const etl::chrono::day &d2) ETL_NOEXCEPT
Greater-than operator.
Definition day.h:198
ETL_CONSTEXPR14 TToDuration duration_cast(const etl::chrono::duration< TRep, TPeriod > &d) ETL_NOEXCEPT
duration_cast
Definition duration.h:343
bitset_ext
Definition absolute.h:40
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > round(const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
Definition time_point.h:188
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > floor(const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
Rounds down a duration to the nearest lower precision.
Definition time_point.h:168
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::time_point< TClock, TToDuration > ceil(const etl::chrono::time_point< TClock, TDuration > &tp) ETL_NOEXCEPT
Rounds up a duration to the nearest higher precision.
Definition time_point.h:178