10#ifndef NROS_CPP_TIMER_HPP
11#define NROS_CPP_TIMER_HPP
23#include "nros_cpp_ffi.h"
60 if (!initialized_)
return true;
79 : executor_(
other.executor_), handle_id_(
other.handle_id_), initialized_(
other.initialized_)
85 other.executor_ =
nullptr;
86 other.initialized_ =
false;
94 executor_ =
other.executor_;
95 handle_id_ =
other.handle_id_;
96 initialized_ =
other.initialized_;
100 other.executor_ =
nullptr;
101 other.initialized_ =
false;
Timer(Timer &&other)
Definition timer.hpp:78
bool is_cancelled() const
Check if the timer is cancelled.
Definition timer.hpp:59
~Timer()
Destructor — cancels the timer.
Definition timer.hpp:68
Timer()
Definition timer.hpp:108
Result cancel()
Definition timer.hpp:46
Result reset()
Definition timer.hpp:53
bool is_valid() const
Check if the timer is initialized and valid.
Definition timer.hpp:65
Timer & operator=(Timer &&other)
Definition timer.hpp:89
nros::Result, nros::ErrorCode, and the NROS_TRY macro.