Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::chrono::duration< TRep, TPeriod > Class Template Reference

duration More...

#include <duration.h>

Public Types

using rep = TRep
 
using period = typename TPeriod::type
 

Public Member Functions

ETL_CONSTEXPR14 duration (const etl::chrono::duration< TRep, TPeriod > &other) ETL_NOEXCEPT
 
template<typename TRep2 >
ETL_CONSTEXPR14 duration (const TRep2 &value_) ETL_NOEXCEPT
 
template<typename TRep2 , typename TPeriod2 , typename etl::enable_if< etl::ratio_divide< TPeriod2, TPeriod >::den==1, int >::type = 0>
ETL_CONSTEXPR14 duration (const etl::chrono::duration< TRep2, TPeriod2 > &other) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodoperator= (const etl::chrono::duration< TRep, TPeriod > &other) ETL_NOEXCEPT
 
template<typename TRep2 , typename TPeriod2 >
ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodoperator= (const etl::chrono::duration< TRep2, TPeriod2 > &other) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 TRep count () const ETL_NOEXCEPT
 
ETL_CONSTEXPR14 etl::common_type_t< durationoperator+ () const ETL_NOEXCEPT
 
ETL_CONSTEXPR14 etl::common_type_t< durationoperator- () const ETL_NOEXCEPT
 
ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodabsolute () const ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator++ () ETL_NOEXCEPT
 
ETL_CONSTEXPR14 duration operator++ (int) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator-- () ETL_NOEXCEPT
 
ETL_CONSTEXPR14 duration operator-- (int) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator+= (const duration< TRep, TPeriod > &d) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator-= (const duration< TRep, TPeriod > &d) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator*= (const TRep &r) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator/= (const TRep &r) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator%= (const TRep &r) ETL_NOEXCEPT
 
ETL_CONSTEXPR14 durationoperator%= (const duration< TRep, TPeriod > &d) ETL_NOEXCEPT
 
template<typename TRep2 , typename TPeriod2 >
ETL_CONSTEXPR14 int compare (const duration< TRep2, TPeriod2 > &other) const ETL_NOEXCEPT
 

Static Public Member Functions

static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodzero () ETL_NOEXCEPT
 
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodmin () ETL_NOEXCEPT
 
static ETL_NODISCARD ETL_CONSTEXPR14 etl::chrono::duration< TRep, TPeriodmax () ETL_NOEXCEPT
 

Detailed Description

template<typename TRep, typename TPeriod = etl::ratio<1>>
class etl::chrono::duration< TRep, TPeriod >

duration

Member Function Documentation

◆ compare()

template<typename TRep , typename TPeriod = etl::ratio<1>>
ETL_CONSTEXPR14 int etl::chrono::duration< TRep, TPeriod >::compare ( const duration< TRep2, TPeriod2 > &  other) const
inline

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


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