GATE
gate::TimeCounter Struct Reference

Monotonic time counter. More...

#include <times.hpp>

Public Member Functions

 TimeCounter (gate_timecounter_t src) noexcept
 
 TimeCounter (TimeCounter const &src) noexcept
 
TimeCounteroperator= (TimeCounter const &src) noexcept
 
TimeCounter add (int64_t microseconds) const noexcept
 
int64_t diff (gate_timecounter_t other) const noexcept
 
int64_t diff (TimeCounter const &other) const noexcept
 
void swap (TimeCounter &other) noexcept
 
bool_t empty () const noexcept
 
bool operator== (gate_timecounter_t that) const noexcept
 
bool operator== (TimeCounter const &that) const noexcept
 
bool operator!= (gate_timecounter_t that) const noexcept
 
bool operator!= (TimeCounter const &that) const noexcept
 
bool operator< (gate_timecounter_t that) const noexcept
 
bool operator< (TimeCounter const &that) const noexcept
 
bool operator> (gate_timecounter_t that) const noexcept
 
bool operator> (TimeCounter const &that) const noexcept
 
bool operator<= (gate_timecounter_t that) const noexcept
 
bool operator<= (TimeCounter const &that) const noexcept
 
bool operator>= (gate_timecounter_t that) const noexcept
 
bool operator>= (TimeCounter const &that) const noexcept
 
time::Microseconds operator- (TimeCounter const &that) const noexcept
 
bool operator! () const noexcept
 
template<class A >
TimeCounter operator+ (Number< time::duration_value_t, A > const &duration) const noexcept
 
template<class A >
TimeCounter operator- (Number< time::duration_value_t, A > const &duration) const noexcept
 
template<class A >
TimeCounteroperator+= (Number< time::duration_value_t, A > const &duration) noexcept
 
template<class A >
TimeCounteroperator-= (Number< time::duration_value_t, A > const &duration) noexcept
 
gate_timecounter_t const * c_impl () const noexcept
 

Static Public Member Functions

static TimeCounter now ()
 

Detailed Description

Monotonic time counter.

Member Function Documentation

◆ add()

TimeCounter gate::TimeCounter::add ( int64_t microseconds) const
noexcept

Returns new timecounter by adding microseconds to the current timecounter

◆ diff() [1/2]

int64_t gate::TimeCounter::diff ( gate_timecounter_t other) const
noexcept

Returns difference in microseconds between current and given timecounter

◆ diff() [2/2]

int64_t gate::TimeCounter::diff ( TimeCounter const & other) const
noexcept

Returns difference in microseconds between current and given timecounter

◆ now()

TimeCounter gate::TimeCounter::now ( )
static

creates current system's timecounter value


The documentation for this struct was generated from the following files: