ros2_control - rolling
Public Member Functions | List of all members
realtime_tools::RealtimeClock Class Reference

Public Member Functions

 RealtimeClock ()
 
 RealtimeClock (rclcpp::Clock::SharedPtr clock)
 
 RealtimeClock (rclcpp::Clock::SharedPtr clock, rclcpp::Logger logger)
 
rclcpp::Time getSystemTime (const rclcpp::Time &realtime_time=rclcpp::Time())
 
rclcpp::Time now (const rclcpp::Time &realtime_time=rclcpp::Time())
 

Constructor & Destructor Documentation

◆ RealtimeClock() [1/3]

realtime_tools::RealtimeClock::RealtimeClock ( )

Default constructor creates an instance that always returns zero time.

◆ RealtimeClock() [2/3]

realtime_tools::RealtimeClock::RealtimeClock ( rclcpp::Clock::SharedPtr  clock)
explicit

Create a realtime-safe wrapper around a clock object.

◆ RealtimeClock() [3/3]

realtime_tools::RealtimeClock::RealtimeClock ( rclcpp::Clock::SharedPtr  clock,
rclcpp::Logger  logger 
)

Create a realtime-safe wrapper around a clock object with a specified logger.

Member Function Documentation

◆ getSystemTime()

rclcpp::Time realtime_tools::RealtimeClock::getSystemTime ( const rclcpp::Time &  realtime_time = rclcpp::Time())

Get the current time from the clock.

Deprecated:
use now() instead.

◆ now()

rclcpp::Time realtime_tools::RealtimeClock::now ( const rclcpp::Time &  realtime_time = rclcpp::Time())

Get the current time from the clock.

Returns
current time, or
zero if RealtimeClock was not given a valid clock object or time is uninitialized.

The documentation for this class was generated from the following files: