| Home | C-Bits Package Documentation | Project Page |
#include <CallbackTimer_PTHREAD.h>
Inheritance diagram for cbits::CallbackTimer_PTHREAD:
Public Types | |
| enum | Type { SINGLE = 1, PERIODIC = 2 } |
| Timer types. More... | |
Public Methods | |
| CallbackTimer_PTHREAD (const Type t, const long tm, CallbackTimerListener &cl) | |
| virtual | ~CallbackTimer_PTHREAD () |
| Destructor. More... | |
| const bool | start () |
| Start the timer. More... | |
| const bool | stop () |
| Stop the timer. More... | |
| virtual void | run () |
| Runnable implementation. More... | |
| const bool | isStopped () const |
| Test if the timer is stopped or expired. More... | |
| const Thread *const | getThread () const |
| Accessor for the cbits::Thread object that's executing this timer. More... | |
Static Public Methods | |
| CallbackTimer * | create (const Type t, const long tm, CallbackTimerListener &cl) |
| Create a callback timer instance. More... | |
Protected Methods | |
| virtual const bool | impl_lock_obj () const |
| Lock the object against concurrent access. More... | |
| virtual const bool | impl_unlock_obj () const |
| Unlock the object. More... | |
| virtual const bool | impl_wait (const long msec) |
| Block the current thread until the specified time interval has expired. More... | |
| virtual const bool | impl_signal () |
| Unblock the thread that is blocked in impl_wait. More... | |
|
|
Timer types.
|
|
||||||||||||||||
|
|
|
|
Destructor.
|
|
||||||||||||||||
|
Create a callback timer instance. Create an initialized timer. The timer must not 'run' until the start method is invoked.
|
|
|
Accessor for the cbits::Thread object that's executing this timer.
|
|
|
Lock the object against concurrent access. This implementation locks a pthread_mutex_t mutex. Implements cbits::CallbackTimer. |
|
|
Unblock the thread that is blocked in impl_wait. This implementation signals the condition variable used in impl_wait to block the thread. Implements cbits::CallbackTimer. |
|
|
Unlock the object. This implementation unlocks the pthread_t mutex that was locked by the impl_lock method. Implements cbits::CallbackTimer. |
|
|
Block the current thread until the specified time interval has expired. This implementation uses a 'timed-wait' on a pthread_cond_t condition variable. Implements cbits::CallbackTimer. |
|
|
Test if the timer is stopped or expired.
|
|
|
Runnable implementation. Not for client use. Implements cbits::Runnable. |
|
|
Start the timer.
|
|
|
Stop the timer.
|
|
|