Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
toolbox::io::Timer Class Reference

#include <toolbox/io/Timer.hpp>

Classes

struct  Impl
 

Public Member Functions

 Timer (Impl *impl)
 
 Timer (std::nullptr_t=nullptr) noexcept
 
 ~Timer ()=default
 
 Timer (const Timer &)=default
 
Timeroperator= (const Timer &)=default
 
 Timer (Timer &&) noexcept=default
 
Timeroperator= (Timer &&) noexcept=default
 
bool empty () const noexcept
 
 operator bool () const noexcept
 
long id () const noexcept
 
bool pending () const noexcept
 
MonoTime expiry () const noexcept
 
Duration interval () const noexcept
 
template<typename RepT , typename PeriodT >
void set_interval (std::chrono::duration< RepT, PeriodT > interval) noexcept
 Setting the interval will not reschedule any pending timer.
 
void reset (std::nullptr_t=nullptr) noexcept
 
void swap (Timer &rhs) noexcept
 
void cancel () noexcept
 
std::partial_ordering operator<=> (const Timer &rhs) const noexcept
 

Friends

class TimerQueue
 

Detailed Description

Definition at line 36 of file Timer.hpp.

Constructor & Destructor Documentation

◆ Timer() [1/4]

toolbox::io::Timer::Timer ( Impl impl)
inlineexplicit

Definition at line 53 of file Timer.hpp.

◆ Timer() [2/4]

toolbox::io::Timer::Timer ( std::nullptr_t  = nullptr)
inlinenoexcept

Definition at line 57 of file Timer.hpp.

◆ ~Timer()

toolbox::io::Timer::~Timer ( )
default

◆ Timer() [3/4]

toolbox::io::Timer::Timer ( const Timer )
default

◆ Timer() [4/4]

toolbox::io::Timer::Timer ( Timer &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

Timer & toolbox::io::Timer::operator= ( const Timer )
default

◆ operator=() [2/2]

Timer & toolbox::io::Timer::operator= ( Timer &&  )
defaultnoexcept

◆ empty()

bool toolbox::io::Timer::empty ( ) const
inlinenoexcept

Definition at line 68 of file Timer.hpp.

◆ operator bool()

toolbox::io::Timer::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 69 of file Timer.hpp.

◆ id()

long toolbox::io::Timer::id ( ) const
inlinenoexcept

Definition at line 70 of file Timer.hpp.

◆ pending()

bool toolbox::io::Timer::pending ( ) const
inlinenoexcept

Definition at line 71 of file Timer.hpp.

◆ expiry()

MonoTime toolbox::io::Timer::expiry ( ) const
inlinenoexcept

Definition at line 73 of file Timer.hpp.

◆ interval()

Duration toolbox::io::Timer::interval ( ) const
inlinenoexcept

Definition at line 74 of file Timer.hpp.

◆ set_interval()

template<typename RepT , typename PeriodT >
void toolbox::io::Timer::set_interval ( std::chrono::duration< RepT, PeriodT interval)
inlinenoexcept

Setting the interval will not reschedule any pending timer.

Definition at line 77 of file Timer.hpp.

◆ reset()

void toolbox::io::Timer::reset ( std::nullptr_t  = nullptr)
inlinenoexcept

Definition at line 82 of file Timer.hpp.

◆ swap()

void toolbox::io::Timer::swap ( Timer rhs)
inlinenoexcept

Definition at line 83 of file Timer.hpp.

◆ cancel()

void toolbox::io::Timer::cancel ( )
inlinenoexcept

Definition at line 193 of file Timer.hpp.

◆ operator<=>()

std::partial_ordering toolbox::io::Timer::operator<=> ( const Timer rhs) const
inlinenoexcept

Definition at line 86 of file Timer.hpp.

Friends And Related Symbol Documentation

◆ TimerQueue

Definition at line 37 of file Timer.hpp.


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