Manages a timer callback. More...
#include <timer.h>
Classes | |
class | Impl |
Public Member Functions | |
bool | hasPending () |
Returns whether or not the timer has any pending events to call. More... | |
bool | hasStarted () const |
bool | isValid () |
bool | isValid () const |
operator void * () | |
bool | operator!= (const Timer &rhs) |
bool | operator< (const Timer &rhs) |
Timer & | operator= (const Timer &other)=default |
bool | operator== (const Timer &rhs) |
void | setPeriod (const Duration &period, bool reset=true) |
Set the period of this timer. More... | |
void | start () |
Start the timer. Does nothing if the timer is already started. More... | |
void | stop () |
Stop the timer. Once this call returns, no more callbacks will be called. Does nothing if the timer is already stopped. More... | |
Timer () | |
Timer (const Timer &rhs) | |
~Timer () | |
Private Types | |
typedef boost::shared_ptr< Impl > | ImplPtr |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Private Member Functions | |
Timer (const TimerOptions &ops) | |
Private Attributes | |
ImplPtr | impl_ |
Friends | |
class | NodeHandle |
Manages a timer callback.
A Timer should always be created through a call to NodeHandle::createTimer(), or copied from one that was. Once all copies of a specific Timer go out of scope, the callback associated with that handle will stop being called.
|
private |
|
private |
|
private |
bool ros::Timer::hasPending | ( | ) |
void ros::Timer::setPeriod | ( | const Duration & | period, |
bool | reset = true |
||
) |
void ros::Timer::start | ( | ) |
void ros::Timer::stop | ( | ) |
|
friend |