xorp

XorpTimer Class Reference

XorpTimer class. More...

#include <timer.hh>

List of all members.

Public Member Functions

bool scheduled () const
const TimeValexpiry () const
bool time_remaining (TimeVal &remain) const
 Get the remaining time until the timer expires.
void schedule_now (int priority=XorpTask::PRIORITY_DEFAULT)
 Expire the XorpTimer object when the TimerList is next run.
void schedule_at (const TimeVal &when, int priority=XorpTask::PRIORITY_DEFAULT)
 Schedule the XorpTimer object at a given time.
void schedule_after (const TimeVal &wait, int priority=XorpTask::PRIORITY_DEFAULT)
 Schedule the XorpTimer object to expire in wait after the current time.
void schedule_after_ms (int ms, int priority=XorpTask::PRIORITY_DEFAULT)
 Schedule the XorpTimer object.
void reschedule_after (const TimeVal &wait)
 Reschedule the XorpTimer object.
void reschedule_after_ms (int ms)
 Reschedule the XorpTimer object.
void unschedule ()
 Unschedule the XorpTimer object.
void clear ()
 Release reference to underlying state.
 XorpTimer (TimerList *list, BasicTimerCallback cb)
 XorpTimer (const XorpTimer &)
XorpTimeroperator= (const XorpTimer &)
TimerNodenode () const

Private Member Functions

 XorpTimer (TimerNode *n)

Private Attributes

TimerNode_node

Friends

class TimerList

Detailed Description

XorpTimer class.

Timers allow callbacks to be made at a specific time in the future. They are ordinarily created via TimerList methods, and they must be associated with an TimerList object in order to be runnable.

See also:
TimerList

Member Function Documentation

const TimeVal & XorpTimer::expiry ( ) const [inline]
Returns:
the expiry time of the XorpTimer
void XorpTimer::reschedule_after ( const TimeVal wait) [inline]

Reschedule the XorpTimer object.

Parameters:
waittime from the most recent expiry.
void XorpTimer::reschedule_after_ms ( int  ms) [inline]

Reschedule the XorpTimer object.

Parameters:
msmilliseconds from the most recent expiry.
void XorpTimer::schedule_after_ms ( int  ms,
int  priority = XorpTask::PRIORITY_DEFAULT 
) [inline]

Schedule the XorpTimer object.

Parameters:
msmilliseconds from the current time.
bool XorpTimer::scheduled ( ) const [inline]
Returns:
true if the timer has been scheduled, and the callback associated with this timer has not been called yet.
bool XorpTimer::time_remaining ( TimeVal remain) const [inline]

Get the remaining time until the timer expires.

Parameters:
remainthe return-by-reference value with the remaining time until the timer expires. If the current time is beyond the expire time (e.g., if we are behind schedule with the timer processing), the return time is zero.
Returns:
true if the remaining time has meaningful value (e.g., if timer was scheduled), otherwise false.
void XorpTimer::unschedule ( ) [inline]

Unschedule the XorpTimer object.

The XorpTimer callback is not invoked.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations