class XorpTimer

XorpTimer class. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

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

bool  scheduled ()

scheduled

[const]

Returns: true if the timer has been scheduled, and the callback associated with this timer has not been called yet.

const TimeVal&  expiry ()

expiry

[const]

Returns: the expiry time of the XorpTimer

bool  time_remaining (TimeVal& remain)

time_remaining

[const]

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  schedule_now (int priority = XorpTask::PRIORITY_DEFAULT)

schedule_now

Expire the XorpTimer object when the TimerList is next run.

void  schedule_at (const TimeVal& when, int priority = XorpTask::PRIORITY_DEFAULT)

schedule_at

Schedule the XorpTimer object at a given time.

void  schedule_after (const TimeVal& wait, int priority = XorpTask::PRIORITY_DEFAULT)

schedule_after

Schedule the XorpTimer object to expire in wait after the current time.

void  schedule_after_ms (int ms, int priority = XorpTask::PRIORITY_DEFAULT)

schedule_after_ms

Schedule the XorpTimer object.

Parameters:

msmilliseconds from the current time.
void  reschedule_after (const TimeVal& wait)

reschedule_after

Reschedule the XorpTimer object.

Parameters:

waittime from the most recent expiry.
void  reschedule_after_ms (int ms)

reschedule_after_ms

Reschedule the XorpTimer object.

Parameters:

msmilliseconds from the most recent expiry.
void  unschedule ()

unschedule

Unschedule the XorpTimer object. The XorpTimer callback is not invoked.

void  clear ()

clear

Release reference to underlying state.

 XorpTimer ()

XorpTimer

 XorpTimer (TimerList* list, BasicTimerCallback cb)

XorpTimer

 XorpTimer (const XorpTimer&)

XorpTimer

 ~XorpTimer ()

~XorpTimer

XorpTimer&  operator= (const XorpTimer&)

operator=

TimerNode*  node ()

node

[const]


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:10:36 2009, using kdoc 2.0a54+XORP.