38 #ifndef REALTIME_TOOLS__REALTIME_CLOCK_H_
39 #define REALTIME_TOOLS__REALTIME_CLOCK_H_
44 #include "rclcpp/clock.hpp"
45 #include "rclcpp/duration.hpp"
46 #include "rclcpp/logger.hpp"
47 #include "rclcpp/time.hpp"
67 RealtimeClock(rclcpp::Clock::SharedPtr clock, rclcpp::Logger logger);
75 [[deprecated]] rclcpp::Time
getSystemTime(
const rclcpp::Time & realtime_time = rclcpp::Time());
82 rclcpp::Time
now(
const rclcpp::Time & realtime_time = rclcpp::Time());
87 rclcpp::Clock::SharedPtr clock_;
88 rclcpp::Logger logger_;
89 unsigned int lock_misses_ = 0;
90 rclcpp::Time system_time_;
91 rclcpp::Duration clock_offset_{0, 0u};
93 rclcpp::Time last_realtime_time_;
94 bool running_ =
false;
95 bool initialized_ =
false;