Lely core libraries  2.2.5
lely::io::TimerBase Class Reference

A reference to an abstract timer. More...

#include <timer.hpp>

Inheritance diagram for lely::io::TimerBase:
Collaboration diagram for lely::io::TimerBase:

Public Member Functions

Clock get_clock () const noexcept
 
int getoverrun (::std::error_code &ec) const noexcept
 
int getoverrun () const
 
::std::pair< duration, duration > gettime (::std::error_code &ec) const noexcept
 
::std::pair< duration, duration > gettime () const
 
::std::pair< duration, duration > settime (const duration &expiry, const duration &period, ::std::error_code &ec) noexcept
 
::std::pair< duration, duration > settime (const duration &expiry, const duration &period={})
 
::std::pair< duration, duration > settime (const time_point &expiry, const duration &period, ::std::error_code &ec) noexcept
 
::std::pair< duration, duration > settime (const time_point &expiry, const duration &period={})
 
void submit_wait (io_timer_wait &wait) noexcept
 
template<class F >
void submit_wait (ev_exec_t *exec, F &&f)
 
template<class F >
typename ::std::enable_if<!::std::is_base_of< io_timer_wait, typename ::std::decay< F >::type >::value >::type submit_wait (F &&f)
 
bool cancel_wait (struct io_timer_wait &wait) noexcept
 
bool abort_wait (struct io_timer_wait &wait) noexcept
 
ev::Future< int, int > async_wait (ev_exec_t *exec, struct io_timer_wait **pwait=nullptr)
 
ev::Future< int, int > async_wait (struct io_timer_wait **pwait=nullptr)
 
- Public Member Functions inherited from lely::io::Device
ContextBase get_ctx () const noexcept
 
ev::Executor get_executor () const noexcept
 
bool cancel (ev_task &task) noexcept
 
::std::size_t cancel_all () noexcept
 
bool abort (ev_task &task) noexcept
 
::std::size_t abort_all () noexcept
 

Detailed Description

A reference to an abstract timer.

This class is a wrapper around io_timer_t*.

Definition at line 130 of file timer.hpp.

Member Function Documentation

◆ get_clock()

Clock lely::io::TimerBase::get_clock ( ) const
inlinenoexcept
See also
io_timer_get_clock()

Definition at line 144 of file timer.hpp.

◆ getoverrun() [1/2]

int lely::io::TimerBase::getoverrun ( ::std::error_code &  ec) const
inlinenoexcept
See also
io_timer_getoverrun()

Definition at line 150 of file timer.hpp.

◆ getoverrun() [2/2]

int lely::io::TimerBase::getoverrun ( ) const
inline
See also
io_timer_getoverrun()

Definition at line 164 of file timer.hpp.

◆ gettime() [1/2]

::std::pair<duration, duration> lely::io::TimerBase::gettime ( ::std::error_code &  ec) const
inlinenoexcept
See also
io_timer_gettime()
Returns
a pair of time intervals. The first interval is the amount of time until the next expiration of the time. The second interval is the reload value of the timer.

Definition at line 179 of file timer.hpp.

◆ gettime() [2/2]

::std::pair<duration, duration> lely::io::TimerBase::gettime ( ) const
inline
See also
io_timer_gettime()
Returns
a pair of time intervals. The first interval is the amount of time until the next expiration of the time. The second interval is the reload value of the timer.

Definition at line 200 of file timer.hpp.

◆ settime() [1/4]

::std::pair<duration, duration> lely::io::TimerBase::settime ( const duration &  expiry,
const duration &  period,
::std::error_code &  ec 
)
inlinenoexcept
See also
io_timer_settime(), gettime()

Definition at line 209 of file timer.hpp.

◆ settime() [2/4]

::std::pair<duration, duration> lely::io::TimerBase::settime ( const duration &  expiry,
const duration &  period = {} 
)
inline
See also
io_timer_settime(), gettime()

Definition at line 226 of file timer.hpp.

◆ settime() [3/4]

::std::pair<duration, duration> lely::io::TimerBase::settime ( const time_point &  expiry,
const duration &  period,
::std::error_code &  ec 
)
inlinenoexcept
See also
io_timer_settime(), gettime()

Definition at line 235 of file timer.hpp.

◆ settime() [4/4]

::std::pair<duration, duration> lely::io::TimerBase::settime ( const time_point &  expiry,
const duration &  period = {} 
)
inline
See also
io_timer_settime(), gettime()

Definition at line 252 of file timer.hpp.

◆ submit_wait() [1/3]

void lely::io::TimerBase::submit_wait ( io_timer_wait wait)
inlinenoexcept
See also
io_timer_submit_wait()

Definition at line 261 of file timer.hpp.

◆ submit_wait() [2/3]

template<class F >
void lely::io::TimerBase::submit_wait ( ev_exec_t exec,
F &&  f 
)
inline
See also
io_timer_submit_wait()

Definition at line 268 of file timer.hpp.

◆ submit_wait() [3/3]

template<class F >
typename ::std::enable_if<!::std::is_base_of< io_timer_wait, typename ::std::decay<F>::type>::value>::type lely::io::TimerBase::submit_wait ( F &&  f)
inline
See also
io_timer_submit_wait()

Definition at line 276 of file timer.hpp.

◆ cancel_wait()

bool lely::io::TimerBase::cancel_wait ( struct io_timer_wait wait)
inlinenoexcept
See also
io_timer_cancel_wait()

Definition at line 282 of file timer.hpp.

◆ abort_wait()

bool lely::io::TimerBase::abort_wait ( struct io_timer_wait wait)
inlinenoexcept
See also
io_timer_abort_wait()

Definition at line 288 of file timer.hpp.

◆ async_wait() [1/2]

ev::Future<int, int> lely::io::TimerBase::async_wait ( ev_exec_t exec,
struct io_timer_wait **  pwait = nullptr 
)
inline
See also
io_timer_async_wait()

Definition at line 294 of file timer.hpp.

◆ async_wait() [2/2]

ev::Future<int, int> lely::io::TimerBase::async_wait ( struct io_timer_wait **  pwait = nullptr)
inline
See also
io_timer_async_wait()

Definition at line 302 of file timer.hpp.


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