Support for delayed or periodic callback execution.
More...
#include <misc/pv/timer.h>
|
typedef std::tr1::shared_ptr
< Timer > | shared_pointer |
|
typedef std::tr1::shared_ptr
< const Timer > | const_shared_pointer |
|
typedef std::tr1::weak_ptr< Timer > | weak_pointer |
|
typedef std::tr1::weak_ptr
< const Timer > | const_weak_pointer |
|
|
| Timer (std::string threadName, ThreadPriority priority) |
|
void | close () |
| Prevent new callbacks from being scheduled, and cancel pending callbacks.
|
|
void | scheduleAfterDelay (TimerCallbackPtr const &timerCallback, double delay) |
|
void | schedulePeriodic (TimerCallbackPtr const &timerCallback, double delay, double period) |
|
bool | cancel (TimerCallbackPtr const &timerCallback) |
|
bool | isScheduled (TimerCallbackPtr const &timerCallback) const |
|
void | dump (std::ostream &o) const |
|
Support for delayed or periodic callback execution.
Definition at line 71 of file timer.h.
epics::pvData::Timer::Timer |
( |
std::string |
threadName, |
|
|
ThreadPriority |
priority |
|
) |
| |
Create a new timer queue
- Parameters
-
threadName | name for the timer thread. |
priority | thread priority |
bool epics::pvData::Timer::cancel |
( |
TimerCallbackPtr const & |
timerCallback | ) |
|
cancel a callback.
- Parameters
-
timerCallback | the timerCallback to cancel. |
- Returns
- true if the timer was queued, and now is cancelled
show the elements in the timer queue.
- Parameters
-
o | The output stream for the output |
bool epics::pvData::Timer::isScheduled |
( |
TimerCallbackPtr const & |
timerCallback | ) |
const |
Is the callback scheduled to be called?
- Parameters
-
timerCallback | the timerCallback. |
- Returns
- (false,true) if (not, is) scheduled.
void epics::pvData::Timer::scheduleAfterDelay |
( |
TimerCallbackPtr const & |
timerCallback, |
|
|
double |
delay |
|
) |
| |
schedule a callback after a delay.
- Parameters
-
timerCallback | the timerCallback instance. |
delay | number of seconds before calling callback. |
void epics::pvData::Timer::schedulePeriodic |
( |
TimerCallbackPtr const & |
timerCallback, |
|
|
double |
delay, |
|
|
double |
period |
|
) |
| |
schedule a periodic callback.`
- Parameters
-
timerCallback | the timerCallback instance. |
delay | number of seconds before first callback. |
period | time in seconds between each callback. |
The documentation for this class was generated from the following file: