#include <ProphetTimer.h>
Definition at line 28 of file ProphetTimer.h.
Public Member Functions | |
ProphetTimer (prophet::ExpirationHandler *eh, oasys::SpinLock *lock) | |
virtual | ~ProphetTimer () |
void | timeout (const struct timeval &now) |
Virtual from oasys::Timer. | |
void | schedule (u_int milliseconds) |
Virtual from prophet::Alarm. | |
u_int | time_remaining () const |
Virtual from prophet::Alarm. | |
void | cancel () |
Virtual from prophet::Alarm. | |
bool | pending () const |
Virtual from prophet::Alarm. | |
bool | cancelled () const |
Virtual from prophet::Alarm. | |
Protected Attributes | |
oasys::SpinLock * | lock_ |
synchronize/serialize access to handler |
dtn::ProphetTimer::ProphetTimer | ( | prophet::ExpirationHandler * | eh, | |
oasys::SpinLock * | lock | |||
) | [inline] |
virtual dtn::ProphetTimer::~ProphetTimer | ( | ) | [inline, virtual] |
Definition at line 42 of file ProphetTimer.h.
void dtn::ProphetTimer::timeout | ( | const struct timeval & | now | ) | [inline] |
Virtual from oasys::Timer.
Definition at line 47 of file ProphetTimer.h.
References lock_, and prophet::Alarm::timeout().
void dtn::ProphetTimer::schedule | ( | u_int | milliseconds | ) | [inline, virtual] |
Virtual from prophet::Alarm.
Implements prophet::Alarm.
Definition at line 55 of file ProphetTimer.h.
Referenced by dtn::ProphetBundleCore::create_alarm().
u_int dtn::ProphetTimer::time_remaining | ( | ) | const [inline, virtual] |
Virtual from prophet::Alarm.
Implements prophet::Alarm.
Definition at line 59 of file ProphetTimer.h.
References dtnsim::gettimeofday(), and TIMEVAL_DIFF_MSEC.
void dtn::ProphetTimer::cancel | ( | ) | [inline, virtual] |
Virtual from prophet::Alarm.
Implements prophet::Alarm.
Definition at line 67 of file ProphetTimer.h.
bool dtn::ProphetTimer::pending | ( | ) | const [inline, virtual] |
Virtual from prophet::Alarm.
Implements prophet::Alarm.
Definition at line 68 of file ProphetTimer.h.
bool dtn::ProphetTimer::cancelled | ( | ) | const [inline, virtual] |
Virtual from prophet::Alarm.
Implements prophet::Alarm.
Definition at line 69 of file ProphetTimer.h.
oasys::SpinLock* dtn::ProphetTimer::lock_ [protected] |
synchronize/serialize access to handler
Definition at line 73 of file ProphetTimer.h.
Referenced by timeout().