A timer to invoke a callback.
More...
#include <Timer.h>
|
| virtual void | Start ()=0 |
| | Start the timer.
|
|
virtual void | Stop ()=0 |
| | Stop the timer.
|
|
virtual void | TryStop ()=0 |
| | Stop the timer without throwing an exception if the timer is not running.
|
| virtual boost::posix_time::time_duration | GetPeriod ()=0 |
| | Get the period of the timer.
|
| virtual void | SetPeriod (const boost::posix_time::time_duration &period)=0 |
| | Set the period of the timer.
|
| virtual bool | IsRunning ()=0 |
| | Check if timer is running.
|
| virtual void | Clear ()=0 |
| | Clear the timer.
|
A timer to invoke a callback.
Timers invoke a callback at a specified rate. The timer can either be one-short, or repeating.
Use RobotRaconteurNode::CreateTimer() to create timers.
◆ Clear()
| virtual void RobotRaconteur::Timer::Clear |
( |
| ) |
|
|
pure virtual |
Clear the timer.
Releases the handler function. The handler of a repeating timer is otherwise kept until the timer is destroyed; Stop(), TryStop() and node shutdown do not release it.
◆ GetPeriod()
| virtual boost::posix_time::time_duration RobotRaconteur::Timer::GetPeriod |
( |
| ) |
|
|
pure virtual |
Get the period of the timer.
- Returns
- boost::posix_time::time_duration
◆ IsRunning()
| virtual bool RobotRaconteur::Timer::IsRunning |
( |
| ) |
|
|
pure virtual |
Check if timer is running.
- Returns
- true
-
false
◆ SetPeriod()
| virtual void RobotRaconteur::Timer::SetPeriod |
( |
const boost::posix_time::time_duration & | period | ) |
|
|
pure virtual |
Set the period of the timer.
- Parameters
-
◆ Start()
| virtual void RobotRaconteur::Timer::Start |
( |
| ) |
|
|
pure virtual |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/robotraconteur-1.3.0-build/RobotRaconteur-1.3.0-Source/RobotRaconteurCore/include/RobotRaconteur/Timer.h