Loading...
Searching...
No Matches
etl::chrono::time_point< TClock, TDuration > Class Template Reference

`#include <time_point.h>`

## Public Types

using | clock = TClock
using | duration = TDuration
using | rep = typename TDuration::rep
using | period = typename TDuration::period

## Public Member Functions

ETL_CONSTEXPR | time_point () ETL_NOEXCEPT
| Default constructor.
ETL_CONSTEXPR14 | time_point (const duration &dur_) ETL_NOEXCEPT
| Construct from a duration.
ETL_CONSTEXPR14 | time_point (const time_point &rhs) ETL_NOEXCEPT
| Copy constructor.
template<typename TDuration2>
ETL_CONSTEXPR14 | time_point (const time_point< clock, TDuration2 > &rhs) ETL_NOEXCEPT
| Copy construct from another time_point with a different duration type.
ETL_CONSTEXPR14 time_point & | operator= (const time_point &rhs) ETL_NOEXCEPT
| Assignment operator.
ETL_NODISCARD ETL_CONSTEXPR14 duration | time_since_epoch () const ETL_NOEXCEPT
ETL_CONSTEXPR14 time_point & | operator+= (const duration &rhs) ETL_NOEXCEPT
| Adds a duration.
ETL_CONSTEXPR14 time_point & | operator-= (const duration &rhs) ETL_NOEXCEPT
| Subtracts a duration.
ETL_CONSTEXPR14 time_point & | operator++ () ETL_NOEXCEPT
| Pre-increments the stored duration by one tick.
ETL_CONSTEXPR14 time_point | operator++ (int) ETL_NOEXCEPT
| Post-increments the stored duration by one tick.
ETL_CONSTEXPR14 time_point & | operator-- () ETL_NOEXCEPT
| Pre-decrements the stored duration by one tick.
ETL_CONSTEXPR14 time_point | operator-- (int) ETL_NOEXCEPT
| Post-decrements the stored duration by one tick.
ETL_NODISCARD ETL_CONSTEXPR14 int | compare (const time_point &other) const ETL_NOEXCEPT

## Static Public Member Functions

static ETL_NODISCARD ETL_CONSTEXPR14 time_point | min () ETL_NOEXCEPT
| Returns a time_point with the smallest possible duration.
static ETL_NODISCARD ETL_CONSTEXPR14 time_point | max () ETL_NOEXCEPT
| Returns a time_point with the largest possible duration.

## Detailed Description

template<typename TClock, typename TDuration = typename TClock::duration>
class etl::chrono::time_point< TClock, TDuration >

Represents a point in time storing a TDuration indicating the time interval from the start of the TClock's epoch.

## Member Function Documentation

## compare()

template<typename TClock, typename TDuration = typename TClock::duration>

ETL_NODISCARD ETL_CONSTEXPR14 int etl::chrono::time_point< TClock, TDuration >::compare | ( | const time_point< TClock, TDuration > & | other | ) | const

inline

Compare day with another. if time_point < other, returns -1 else if time_point > other, returns 1 else returns 0

## time_since_epoch()

template<typename TClock, typename TDuration = typename TClock::duration>

ETL_NODISCARD ETL_CONSTEXPR14 duration etl::chrono::time_point< TClock, TDuration >::time_since_epoch | ( |  | ) | const

inline

Returns a duration representing the amount of time between this and the clock's epoch.

The documentation for this class was generated from the following file:

- include/etl/private/chrono/time_point.h