Class RealtimeClock

Class Documentation

class RealtimeClock

Public Functions

RealtimeClock()

Default constructor creates an instance that always returns zero time.

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

Create a realtime-safe wrapper around a clock object.

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

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

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

Get the current time from the clock.

Deprecated:

use now() instead.

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

Get the current time from the clock.

Returns:

current time, or

Returns:

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