ros-drivers / rosserial

A ROS client library for small, embedded devices, such as Arduino. See: http://wiki.ros.org/rosserial
508 stars 527 forks source link

Method to compute duration between time stamps #498

Closed rikba closed 3 years ago

rikba commented 4 years ago

This PR adds a method to compute the difference between two time stamps Duration operator -(const Time &rhs).

We use this for example to compute the duration between two strobe signals of a camera or to compute durations between reading sensor signals.

stertingen commented 4 years ago

I think, this should be added to the noetic release as it is consistent with the roscpp behavior: https://wiki.ros.org/roscpp/Overview/Time

mikepurvis commented 3 years ago

Looks great, and thanks for also updating the test.