15 #ifndef RCLCPP__RATE_HPP_
16 #define RCLCPP__RATE_HPP_
21 #include "rclcpp/clock.hpp"
22 #include "rclcpp/duration.hpp"
23 #include "rclcpp/macros.hpp"
24 #include "rclcpp/visibility_control.hpp"
32 RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(
RateBase)
38 virtual bool sleep() = 0;
44 virtual void reset() = 0;
47 using std::chrono::duration;
48 using std::chrono::duration_cast;
49 using std::chrono::nanoseconds;
54 RCLCPP_SMART_PTR_DEFINITIONS(
Rate)
59 const Clock::SharedPtr & clock = std::make_shared<Clock>(
RCL_SYSTEM_TIME));
64 const Clock::SharedPtr & clock = std::make_shared<Clock>(
RCL_SYSTEM_TIME));
79 std::chrono::nanoseconds
83 RCLCPP_DISABLE_COPY(
Rate)
85 Clock::SharedPtr clock_;
94 explicit WallRate(
const double rate);
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
enum rcl_clock_type_e rcl_clock_type_t
Time source type, used to indicate the source of a time measurement.
@ RCL_SYSTEM_TIME
Use system time.