18 #ifndef _ROS_DURATION_H_ 19 #define _ROS_DURATION_H_ 34 Duration(int32_t _sec, int32_t _nsec) : sec(_sec), nsec(_nsec)
39 double toSec()
const {
return (
double)sec + 1e-9*(double)nsec; };
40 void fromSec(
double t) { sec = (uint32_t) floor(t); nsec = (uint32_t) round((t-sec) * 1e9); };
ROSTIME_DECL void normalizeSecNSecSigned(int64_t &sec, int64_t &nsec)