|
EpcTools
An event based multi-threaded C++ development framework.
|
Thread timer class. More...
#include <etevent.h>
Public Member Functions | |
| EThreadEventTimer () | |
| Default class constructor. More... | |
| EThreadEventTimer (Long milliseconds, Bool oneshot=False) | |
| Class constructor with configuration parameters. More... | |
| ~EThreadEventTimer () | |
| Class destructor. More... | |
| Void | destroy () |
| Stops and destroys the underlying timer object. More... | |
| Void | start () |
| Starts the timer. More... | |
| Void | stop () |
| Stops the timer. More... | |
| Long | getInterval () |
| Returns the timer interval in milliseconds. More... | |
| Void | setInterval (Long interval) |
| sets the timer interval More... | |
| Void | setOneShot (Bool oneshot) |
| sets the type of timer More... | |
| Long | getId () |
| Returns the unique timer id. More... | |
| Bool | isInitialized () |
| Indicates if this timer object has been initialized. More... | |
Public Member Functions inherited from EStatic | |
| virtual Int | getInitType () |
| virtual Void | init (EGetOpt &opt) |
| Performs class specific initialization. More... | |
| virtual Void | uninit () |
| Performs uninitialization at system shutdown. More... | |
Friends | |
| class | EThreadEventTimerHandler |
| template<class TQueue , class TMessage > | |
| class | EThreadEvent |
Additional Inherited Members | |
Static Public Member Functions inherited from EStatic | |
| static Void | Initialize (EGetOpt &opt) |
| static Void | UnInitialize () |
Thread timer class.
EThreadBase::Timer represents an individual timer. When the timer expires, the EM_TIMER event will be raised. The application can handle the timer by overrideing the onTimer method.
|
inline |
Default class constructor.
|
inline |
Class constructor with configuration parameters.
| milliseconds | the number of milliseconds before the timer expires |
| oneshot | True - one shot timer, False - periodic (recurring) timer |
|
inline |
Class destructor.
|
inline |
Stops and destroys the underlying timer object.
Calling destroy() will stop the timer and then delete the underlying timer object. This method is called by the destructor.
|
inline |
Returns the unique timer id.
The timer ID is created internally when the timer object is instantiated.
|
inline |
Returns the timer interval in milliseconds.
|
inline |
Indicates if this timer object has been initialized.
The timer ID is created internally when the timer object is instantiated.
|
inline |
sets the timer interval
| interval | the timer interval in milliseconds. |
|
inline |
sets the type of timer
| oneshot | True - one shot timer, False - periodic (recurring timer) |
|
inline |
Starts the timer.
| EThreadTimerError_NotInitialized | timer not initialized |
| EThreadTimerError_UnableToStart | unable to start the timer |
|
inline |
Stops the timer.
|
friend |
|
friend |
1.8.16