Support for delayed or periodic callback execution.
More...
#include <misc/pv/timer.h>
|
| | 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 73 of file timer.h.
◆ const_shared_pointer
| std::tr1::shared_ptr<const Timer> epics::pvData::Timer::const_shared_pointer |
◆ const_weak_pointer
| std::tr1::weak_ptr<const Timer> epics::pvData::Timer::const_weak_pointer |
◆ shared_pointer
| std::tr1::shared_ptr<Timer> epics::pvData::Timer::shared_pointer |
◆ weak_pointer
| std::tr1::weak_ptr<Timer> epics::pvData::Timer::weak_pointer |
◆ Timer()
| epics::pvData::Timer::Timer |
( |
std::string | threadName, |
|
|
ThreadPriority | priority ) |
Create a new timer queue
- Parameters
-
| threadName | name for the timer thread. |
| priority | thread priority |
◆ cancel()
| 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
◆ dump()
| void epics::pvData::Timer::dump |
( |
std::ostream & | o | ) |
const |
show the elements in the timer queue.
- Parameters
-
| o | The output stream for the output |
◆ isScheduled()
| 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.
◆ scheduleAfterDelay()
| 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. |
◆ schedulePeriodic()
| 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: