EtcPal  0.4.1
ETC Platform Abstraction Layer (EtcPal)
View other versions:
timer (Timers)

Overview

C++ utilities for the timer (Timers) module.

WARNING: This module must be explicitly initialized before use. Initialize the module by calling etcpal_init() with the relevant feature mask:

etcpal_error_t etcpal_init(etcpal_features_t features)
Initialize the EtcPal library.
Definition: common.c:87
#define ETCPAL_FEATURE_TIMERS
Use the etcpal/timer module.
Definition: common.h:129

NOTE: The constructs in this module are available in similar form in the C++ standard library using the <chrono> header, with the advantage that this module will work on any platform for which EtcPal is ported, including embedded RTOS platforms, using their native tick count. If your application or library does not need to run on these platforms, consider using <chrono> instead.

Provides a class for representing points in time (TimePoint) and one which implements a passive monotonic timer (Timer).

Data Structures

class  TimePoint
 Represents a point in time. More...
 
class  Timer
 A wrapper class for the EtcPal timer type. More...
 

TimePoint operators

constexpr int32_t operator- (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator== (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator!= (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator< (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator> (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator<= (const TimePoint &a, const TimePoint &b) noexcept
 
constexpr bool operator>= (const TimePoint &a, const TimePoint &b) noexcept