ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
While I'm not sure what the advantage is, I think this is the reason for it in ROS 2.
builtin_interfaces/msg/Time is part of the builtin_interfaces
package which contains "message and service definitions for types defined in the OMG IDL Platform Specific Model".
In section 2.3.2 of the OMG DDS 1.4 spec the Duration_T
and Time_T
types are defined:
The two types used to represent time: Duration_t and Time_t are mapped into structures that contain fields for the second and the nanosecond parts. These types are further constrained to always use a ‘normalized’ representation for the time, that is, the nanosec field must verify 0 <= nanosec < 1000000000
and a little lower down
struct Time_t {
long sec;
unsigned long nanosec;
};