Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rclcpp/include/rclcpp/time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ class Time
static Time
now()
{
rcl_time_point_value_t rcl_now = 0;
rcl_ret_t ret = RCL_RET_ERROR;
rcutils_time_point_value_t rcutils_now = 0;
rcutils_ret_t ret = RCUTILS_RET_ERROR;
if (ClockT == RCL_ROS_TIME) {
throw std::runtime_error("RCL_ROS_TIME is currently not implemented.");
ret = false;
} else if (ClockT == RCL_SYSTEM_TIME) {
ret = rcl_system_time_now(&rcl_now);
ret = rcutils_system_time_now(&rcutils_now);
} else if (ClockT == RCL_STEADY_TIME) {
ret = rcl_steady_time_now(&rcl_now);
ret = rcutils_steady_time_now(&rcutils_now);
}
if (ret != RCL_RET_OK) {
if (ret != RCUTILS_RET_OK) {
rclcpp::exceptions::throw_from_rcl_error(
ret, "Could not get current time: ");
}

return Time(std::move(rcl_now));
return Time(std::move(rcutils_now));
}

operator builtin_interfaces::msg::Time() const
Expand Down