FastLED 3.9.15
Loading...
Searching...
No Matches
fl::chrono::time_point< Clock, Duration > Class Template Reference

Detailed Description

template<typename Clock, typename Duration = typename Clock::duration>
class fl::chrono::time_point< Clock, Duration >

Represents a point in time relative to a clock.

Template Parameters
ClockThe clock type this time_point is measured against
DurationThe duration type used to measure time since epoch

This is a simplified version of std::chrono::time_point that provides:

  • Storage for a time point as a duration since the clock's epoch
  • Comparison operators
  • Arithmetic with other time_points and durations

Definition at line 123 of file chrono.h.

#include <chrono.h>

+ Inheritance diagram for fl::chrono::time_point< Clock, Duration >:

Public Types

using clock = Clock
 
using duration = Duration
 
using period = typename Duration::period
 
using rep = typename Duration::rep
 

Public Member Functions

constexpr time_point () FL_NOEXCEPT
 Default constructor - epoch time point.
 
constexpr time_point (const Duration &d) FL_NOEXCEPT
 Construct from a duration since epoch.
 
constexpr bool operator!= (const time_point &rhs) const FL_NOEXCEPT
 
constexpr time_point operator+ (const Duration &d) const FL_NOEXCEPT
 Add a duration to a time_point.
 
constexpr time_point operator- (const Duration &d) const FL_NOEXCEPT
 Subtract a duration from a time_point.
 
constexpr Duration operator- (const time_point &rhs) const FL_NOEXCEPT
 Subtract two time_points to get a duration.
 
constexpr bool operator< (const time_point &rhs) const FL_NOEXCEPT
 
constexpr bool operator<= (const time_point &rhs) const FL_NOEXCEPT
 
constexpr bool operator== (const time_point &rhs) const FL_NOEXCEPT
 
constexpr bool operator> (const time_point &rhs) const FL_NOEXCEPT
 
constexpr bool operator>= (const time_point &rhs) const FL_NOEXCEPT
 
constexpr Duration time_since_epoch () const FL_NOEXCEPT
 Get the duration since epoch.
 

Private Attributes

Duration mDuration
 

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