|
IBR-DTNSuite
0.12
|
#include <Timer.h>


Classes | |
| class | StopTimerException |
Public Types | |
| typedef size_t | time_t |
Public Member Functions | |
| Timer (TimerCallback &callback, size_t timeout=0) | |
| virtual | ~Timer () |
| void | set (size_t timeout) |
| void | reset () |
| void | pause () |
| size_t | getTimeout () const |
Public Member Functions inherited from ibrcommon::JoinableThread | |
| virtual | ~JoinableThread ()=0 |
| void | join (void) throw (ThreadException) |
| bool | isRunning (void) |
| void | start (int priority=0) throw (ThreadException) |
| void | stop () throw () |
Static Public Member Functions | |
| static time_t | get_current_time () |
Protected Member Functions | |
| void | run () throw () |
| void | __cancellation () throw () |
Protected Member Functions inherited from ibrcommon::JoinableThread | |
| JoinableThread (size_t size=DEFAULT_STACKSIZE) | |
Protected Member Functions inherited from ibrcommon::Thread | |
| virtual | ~Thread ()=0 |
| void | reset () throw (ThreadException) |
| virtual void | setup (void) throw () |
| virtual void | finally (void) throw () |
| bool | isFinalized () throw () |
| bool | operator== (const ibrcommon::Thread &other) |
| Thread (size_t stack=DEFAULT_STACKSIZE) | |
| int | kill (int sig) |
| void | cancel () throw () |
Additional Inherited Members | |
Static Protected Member Functions inherited from ibrcommon::Thread | |
| static size_t | getNumberOfProcessors () |
| static void | yield (void) |
| static void | sleep (time_t timeout) |
| static void | concurrency (int level) |
| static bool | equal (pthread_t thread1, pthread_t thread2) |
| static void * | __execute__ (void *obj) throw () |
| typedef size_t ibrcommon::Timer::time_t |
| ibrcommon::Timer::Timer | ( | TimerCallback & | callback, |
| size_t | timeout = 0 |
||
| ) |
|
virtual |
Definition at line 48 of file Timer.cpp.
References ibrcommon::JoinableThread::join(), and ibrcommon::JoinableThread::stop().

|
protectedvirtual | |||||||||||||
Implements ibrcommon::Thread.
|
static |
Definition at line 33 of file Timer.cpp.
Referenced by dtn::api::Registration::isPersistent(), and dtn::api::Registration::setPersistent().
| size_t ibrcommon::Timer::getTimeout | ( | ) | const |
| void ibrcommon::Timer::pause | ( | ) |
This method stops the timer. Use reset() to start it again.
Definition at line 74 of file Timer.cpp.
Referenced by dtn::core::WallClock::componentDown(), and dtn::api::ApiServer::componentDown().
| void ibrcommon::Timer::reset | ( | ) |
This method resets the timer.
Definition at line 68 of file Timer.cpp.
Referenced by dtn::core::WallClock::componentUp().
|
protectedvirtual | |||||||||||||
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
Definition at line 85 of file Timer.cpp.
References ibrcommon::Conditional::ConditionalAbortException::COND_ABORT, ibrcommon::Conditional::ConditionalAbortException::COND_ERROR, ibrcommon::Conditional::ConditionalAbortException::COND_TIMEOUT, ibrcommon::Conditional::ConditionalAbortException::reason, ibrcommon::TimerCallback::timeout(), and ibrcommon::Thread::yield().
