Function cras::saturateAdd
Defined in File time_utils.hpp
Function Documentation
-
::rclcpp::Time cras::saturateAdd(const ::rclcpp::Time &time, const ::rclcpp::Duration &duration)
Return current ROS time if it has already been initialized, or current wall time.
Add the given duration to the given time, but saturate the result instead of throwing exception on overflow.
- Parameters:
time – [in] The time to be added to.
duration – [in] The duration to add.
- Returns:
Current time.
- Returns:
The time plus the duration saturated between 0 and TIME_MAX.