33 #ifndef REALTIME_TOOLS__REALTIME_CLOCK_HPP_
34 #define REALTIME_TOOLS__REALTIME_CLOCK_HPP_
39 #include "rclcpp/clock.hpp"
40 #include "rclcpp/duration.hpp"
41 #include "rclcpp/logger.hpp"
42 #include "rclcpp/time.hpp"
46 class [[deprecated("Use rclcpp::Clock or std::chrono::steady_clock instead")]]
RealtimeClock
62 RealtimeClock(rclcpp::Clock::SharedPtr clock, rclcpp::Logger logger);
70 [[deprecated]] rclcpp::Time
getSystemTime(
const rclcpp::Time & realtime_time = rclcpp::Time());
77 rclcpp::Time now(
const rclcpp::Time & realtime_time = rclcpp::Time());
82 rclcpp::Clock::SharedPtr clock_;
83 rclcpp::Logger logger_;
84 unsigned int lock_misses_ = 0;
85 rclcpp::Time system_time_;
86 rclcpp::Duration clock_offset_{0, 0u};
88 rclcpp::Time last_realtime_time_;
89 bool running_ =
false;
90 bool initialized_ =
false;