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

Method plus

pose_graph/ThirdParty/DUtils/Timestamp.cpp:109–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109Timestamp Timestamp::plus(unsigned long secs, unsigned long usecs) const {
110 Timestamp t;
111
112 const unsigned long max = 1000000ul;
113
114 if (m_usecs + usecs >= max)
115 t.setTime(m_secs + secs + 1, m_usecs + usecs - max);
116 else
117 t.setTime(m_secs + secs, m_usecs + usecs);
118
119 return t;
120}
121
122Timestamp Timestamp::operator-(double s) const {
123 unsigned long secs = (long)floor(s);

Callers 1

operator+Method · 0.95

Calls 1

setTimeMethod · 0.45

Tested by

no test coverage detected