Single timer object in rofl-common. More...
#include <ctimer.h>
Classes | |
class | ctimer_find_by_timer_id |
Public Member Functions | |
virtual | ~ctimer () |
ctimer destructor | |
ctimer () | |
ctimer default constructor | |
ctimer (ctimer_env *env, int opaque, const rofl::ctimespec ×pec, void *data=(void *) 0) | |
ctimer constructor More... | |
ctimer (const rofl::ctimer &timer) | |
ctimer copy constructor | |
Operators | |
ctimer & | operator= (const rofl::ctimer &timer) |
Assignment operator. | |
bool | operator== (const rofl::ctimer &t) const |
Equality operator. | |
bool | operator!= (const rofl::ctimer &t) const |
Inequality operator. | |
bool | operator< (const rofl::ctimer &t) const |
Lesser operator. | |
bool | operator<= (const rofl::ctimer &t) const |
Lesser-or-equal operator. | |
bool | operator> (const rofl::ctimer &t) const |
Greater operator. | |
bool | operator>= (const rofl::ctimer &t) const |
Greater-or-equal operator. | |
Methods to access data members | |
ctimer_env * | get_timer_env () const |
Returns pointer to environment of this rofl::ctimer instance. | |
const rofl::ctimerid & | get_timer_id () const |
Returns const reference to rofl-common's internal handle assigned to this timer. | |
int | get_opaque () const |
Returns opaque timer type chosen by user. | |
void * | get_data () const |
Returns pointer to opaque data segment chosen by user. | |
rofl::ctimespec & | set_timespec () |
Returns reference to rofl::ctimespec instance assigned to this timer. | |
const rofl::ctimespec & | get_timespec () const |
Returns const reference to rofl::ctimespec instance assigned to this timer. | |
Static Public Member Functions | |
static rofl::ctimer | now () |
Returns a rofl::ctimer object with internal timespec set to current time. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const rofl::ctimer &timer) |
Single timer object in rofl-common.
A single timer instance that binds together the timer value stored in an instance of class rofl::ctimespec, rofl-common's internal timer handle (rofl::ctimerid) and the user defined opaque values for timer type and data segment. Used by classes rofl::ciosrv and rofl::cioloop.
|
inline |
ctimer constructor
env | environment for this rofl::ctimer instance |
opaque | arbitrary number ćhosen by user, not used by ctimer class |
timespec | absolute time when this timer expires |
data | arbitrary pointer chosen by user, not used by ctimer class |
|
inlinestatic |
Returns a rofl::ctimer object with internal timespec set to current time.