49 int64_t nsec_part = nsec % 1000000000L;
50 int64_t sec_part = sec + nsec / 1000000000L;
53 nsec_part += 1000000000L;
57 if (sec_part < std::numeric_limits<int32_t>::min() || sec_part > std::numeric_limits<int32_t>::max())
58 throw std::runtime_error(
"Duration is out of dual 32-bit range");
67 int64_t nsec64 =
nsec;
72 nsec = (int32_t)nsec64;
ROSTIME_DECL void normalizeSecNSecSigned(int64_t &sec, int64_t &nsec)
Class to help run loops at a desired frequency.
Duration representation for use with the WallTime class.
Base class for Duration implementations. Provides storage, common functions and operator overloads...
Duration representation for use with the Time class.