IBR-DTNSuite
0.12
|
#include <WallClock.h>
Public Member Functions | |
WallClock (const dtn::data::Timeout &frequency) | |
virtual | ~WallClock () |
void | sync () |
virtual size_t | timeout (ibrcommon::Timer *) |
virtual const std::string | getName () const |
Public Member Functions inherited from ibrcommon::Conditional | |
Conditional () | |
virtual | ~Conditional () |
void | signal (bool broadcast=false) throw () |
void | wait (size_t timeout=0) throw (ConditionalAbortException) |
void | wait (struct timespec *ts) throw (ConditionalAbortException) |
void | abort () throw () |
void | reset () throw () |
Public Member Functions inherited from ibrcommon::Mutex | |
Mutex (MUTEX_TYPE type=MUTEX_NORMAL) | |
virtual | ~Mutex () |
virtual void | trylock () throw (MutexException) |
virtual void | enter () throw (MutexException) |
virtual void | leave () throw (MutexException) |
Public Member Functions inherited from ibrcommon::MutexInterface | |
virtual | ~MutexInterface ()=0 |
Public Member Functions inherited from dtn::daemon::IntegratedComponent | |
IntegratedComponent () | |
virtual | ~IntegratedComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
virtual | ~Component ()=0 |
Public Member Functions inherited from ibrcommon::TimerCallback | |
virtual | ~TimerCallback () |
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
Additional Inherited Members | |
Public Types inherited from ibrcommon::Mutex | |
enum | MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK } |
Static Public Member Functions inherited from ibrcommon::Conditional | |
static void | gettimeout (size_t timeout, struct timespec *hires) throw () |
Protected Attributes inherited from ibrcommon::Mutex | |
pthread_mutex_t | m_mutex |
pthread_mutexattr_t | m_attr |
Definition at line 35 of file WallClock.h.
dtn::core::WallClock::WallClock | ( | const dtn::data::Timeout & | frequency) |
Constructor for the global Clock
frequency | Specify the frequency for the clock tick in seconds. |
Definition at line 32 of file WallClock.cpp.
|
virtual |
Definition at line 36 of file WallClock.cpp.
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 67 of file WallClock.cpp.
References ibrcommon::Timer::pause().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 50 of file WallClock.cpp.
References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::JoinableThread::isRunning(), ibrcommon::Timer::reset(), ibrcommon::JoinableThread::start(), and ibrcommon::Exception::what().
|
virtual |
Implements dtn::daemon::Component.
Definition at line 88 of file WallClock.cpp.
void dtn::core::WallClock::sync | ( | ) |
Blocks until the next clock tick happens.
Definition at line 40 of file WallClock.cpp.
References ibrcommon::Conditional::wait().
|
virtual |
timer callback method
Implements ibrcommon::TimerCallback.
Definition at line 72 of file WallClock.cpp.
References dtn::data::SDNV< E >::get(), dtn::utils::Clock::getMonotonicTimestamp(), dtn::utils::Clock::getTime(), dtn::core::TimeEvent::raise(), ibrcommon::Conditional::signal(), and dtn::core::TIME_SECOND_TICK.