15 #ifndef RCLCPP__TIME_HPP_
16 #define RCLCPP__TIME_HPP_
18 #include "builtin_interfaces/msg/time.hpp"
20 #include "rclcpp/visibility_control.hpp"
24 #include "rclcpp/duration.hpp"
72 const builtin_interfaces::msg::Time & time_msg,
88 operator builtin_interfaces::msg::Time()
const;
106 operator=(
const builtin_interfaces::msg::Time & time_msg);
243 builtin_interfaces::msg::Time
RCLCPP_PUBLIC Time & operator-=(const rclcpp::Duration &rhs)
RCLCPP_PUBLIC Time(const Time &rhs)
Copy constructor.
RCLCPP_PUBLIC Time & operator+=(const rclcpp::Duration &rhs)
RCLCPP_PUBLIC Time(Time &&rhs) noexcept
Move constructor.
RCLCPP_PUBLIC bool operator>=(const rclcpp::Time &rhs) const
RCLCPP_PUBLIC double seconds() const
Get the seconds since epoch.
virtual RCLCPP_PUBLIC ~Time()
Time destructor.
RCLCPP_PUBLIC Duration operator-(const rclcpp::Time &rhs) const
RCLCPP_PUBLIC rcl_time_point_value_t nanoseconds() const
Get the nanoseconds since epoch.
RCLCPP_PUBLIC Time & operator=(Time &&rhs) noexcept
RCLCPP_PUBLIC bool operator<(const rclcpp::Time &rhs) const
RCLCPP_PUBLIC Time & operator=(const Time &rhs)
RCLCPP_PUBLIC rcl_clock_type_t get_clock_type() const
Get the clock type.
RCLCPP_PUBLIC bool operator<=(const rclcpp::Time &rhs) const
static RCLCPP_PUBLIC Time max(rcl_clock_type_t clock_type=RCL_SYSTEM_TIME)
Get the maximum representable value.
RCLCPP_PUBLIC bool operator==(const rclcpp::Time &rhs) const
RCLCPP_PUBLIC Time operator+(const rclcpp::Duration &rhs) const
RCLCPP_PUBLIC bool operator>(const rclcpp::Time &rhs) const
RCLCPP_PUBLIC Time(int32_t seconds, uint32_t nanoseconds, rcl_clock_type_t clock_type=RCL_SYSTEM_TIME)
Time constructor.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
RCLCPP_PUBLIC builtin_interfaces::msg::Time convert_rcl_time_to_sec_nanos(const rcl_time_point_value_t &time_point)
Convert rcl_time_point_value_t to builtin_interfaces::msg::Time.
A single point in time, measured in nanoseconds, the reference point is based on the source.
enum rcl_clock_type_e rcl_clock_type_t
Time source type, used to indicate the source of a time measurement.
rcutils_time_point_value_t rcl_time_point_value_t
A single point in time, measured in nanoseconds since the Unix epoch.
@ RCL_ROS_TIME
Use ROS time.
@ RCL_SYSTEM_TIME
Use system time.