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"
68 const builtin_interfaces::msg::Time & time_msg,
84 operator builtin_interfaces::msg::Time()
const;
101 operator=(
const builtin_interfaces::msg::Time & time_msg);
RCLCPP_PUBLIC Time & operator-=(const rclcpp::Duration &rhs)
static RCLCPP_PUBLIC Time max()
Get the maximum representable value.
RCLCPP_PUBLIC Time(const Time &rhs)
Copy constructor.
RCLCPP_PUBLIC Time & operator+=(const rclcpp::Duration &rhs)
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 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
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 Time operator+(const rclcpp::Duration &lhs, const rclcpp::Time &rhs)
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.