MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / normalizeSecNSec

Function normalizeSecNSec

okvis_ros/okvis/okvis_time/src/Time.cpp:344–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342bool WallDuration::sleep() const { return okvis_wallsleep(sec, nsec); }
343
344void normalizeSecNSec(uint64_t& sec, uint64_t& nsec) { // NOLINT
345 uint64_t nsec_part = nsec % 1000000000UL;
346 uint64_t sec_part = nsec / 1000000000UL;
347
348 if (sec_part > UINT_MAX) throw std::runtime_error("Time is out of dual 32-bit range");
349
350 sec += sec_part;
351 nsec = nsec_part;
352}
353
354void normalizeSecNSec(uint32_t& sec, uint32_t& nsec) { // NOLINT
355 uint64_t sec64 = sec;

Callers 2

TimeBaseMethod · 0.85
Time.hppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected