IBR-DTNSuite
0.8
|
#include <WallClock.h>
Public Member Functions | |
WallClock (size_t frequency) | |
virtual | ~WallClock () |
void | sync () |
virtual size_t | timeout (ibrcommon::Timer *) |
virtual const std::string | getName () const |
Protected Member Functions | |
virtual void | componentUp () |
virtual void | componentDown () |
Definition at line 20 of file WallClock.h.
dtn::core::WallClock::WallClock | ( | size_t | frequency | ) |
Constructor for the global Clock
frequency | Specify the frequency for the clock tick in seconds. |
Definition at line 17 of file WallClock.cpp.
dtn::core::WallClock::~WallClock | ( | ) | [virtual] |
Definition at line 21 of file WallClock.cpp.
void dtn::core::WallClock::componentDown | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 47 of file WallClock.cpp.
References ibrcommon::Timer::pause().
void dtn::core::WallClock::componentUp | ( | ) | [protected, virtual] |
Implements dtn::daemon::IntegratedComponent.
Definition at line 35 of file WallClock.cpp.
References ibrcommon::JoinableThread::isRunning(), ibrcommon::Timer::reset(), and ibrcommon::JoinableThread::start().
const std::string dtn::core::WallClock::getName | ( | ) | const [virtual] |
Implements dtn::daemon::Component.
Definition at line 75 of file WallClock.cpp.
void dtn::core::WallClock::sync | ( | ) |
Blocks until the next clock tick happens.
Definition at line 25 of file WallClock.cpp.
References ibrcommon::Conditional::wait().
size_t dtn::core::WallClock::timeout | ( | ibrcommon::Timer * | ) | [virtual] |
timer callback method
Implements ibrcommon::TimerCallback.
Definition at line 52 of file WallClock.cpp.
References dtn::utils::Clock::getTime(), dtn::utils::Clock::getUnixTimestamp(), dtn::core::TimeEvent::raise(), ibrcommon::Conditional::signal(), and dtn::core::TIME_SECOND_TICK.