Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::Timer Class Referenceabstract

A timer to invoke a callback. More...

#include <Timer.h>

Public Member Functions

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.

Detailed Description

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.

Member Function Documentation

◆ 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
period

◆ Start()

virtual void RobotRaconteur::Timer::Start ( )
pure virtual

Start the timer.

Must be called after RobotRaconteurNode::CreateTimer()


The documentation for this class was generated from the following file: