15 #ifndef RCLCPP__TIMER_HPP_ 16 #define RCLCPP__TIMER_HPP_ 23 #include <type_traits> 114 :
TimerBase(period), callback_(
std::forward<FunctorT>(callback))
138 execute_callback_delegate<>();
143 typename CallbackT = FunctorT,
155 typename CallbackT = FunctorT,
169 return Clock::is_steady;
178 template<typename CallbackType>
184 #endif // RCLCPP__TIMER_HPP_
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
virtual void execute_callback()=0
void execute_callback_delegate()
Definition: timer.hpp:149
#define RCL_RET_TIMER_CANCELED
Generic timer templated on the clock type. Periodically executes a user-specified callback...
Definition: timer.hpp:103
Definition: allocator_common.hpp:24
rcl_ret_t rcl_timer_fini(rcl_timer_t *timer)
rcl_timer_t rcl_get_zero_initialized_timer(void)
rcl_ret_t rcl_timer_call(rcl_timer_t *timer)
rcl_timer_t timer_handle_
Definition: timer.hpp:86
virtual ~GenericTimer()
Default destructor.
Definition: timer.hpp:119
#define RCLCPP_SMART_PTR_DEFINITIONS(...)
Definition: macros.hpp:36
Definition: function_traits.hpp:141
#define rcl_get_error_string_safe
void execute_callback()
Definition: timer.hpp:129
#define RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(...)
Definition: macros.hpp:51
TimerBase(std::chrono::nanoseconds period)
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
std::chrono::nanoseconds time_until_trigger()
Check how long the timer has until its next scheduled callback.
bool is_ready()
Check if the timer is ready to trigger the callback.
virtual bool is_steady()
Is the clock steady (i.e. is the time between ticks constant?)
Definition: timer.hpp:167
virtual bool is_steady()=0
Is the clock steady (i.e. is the time between ticks constant?)
const rcl_timer_t * get_timer_handle()