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

Method SecondsToTimeString

pose_graph/src/utils/Statistics.cpp:188–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188std::string Statistics::SecondsToTimeString(double seconds) {
189 double secs = fmod(seconds, 60);
190 int minutes = (seconds / 60);
191 int hours = (seconds / 3600);
192 minutes = minutes - (hours * 60);
193
194 char buffer[256];
195 snprintf(buffer,
196 sizeof(buffer),
197#ifdef SM_TIMING_SHOW_HOURS
198 "%02d:"
199#endif
200#ifdef SM_TIMING_SHOW_MINUTES
201 "%02d:"
202#endif
203 "%09.6f",
204#ifdef SM_TIMING_SHOW_HOURS
205 hours,
206#endif
207#ifdef SM_TIMING_SHOW_MINUTES
208 minutes,
209#endif
210 secs);
211 return buffer;
212}
213
214void Statistics::Print(std::ostream& out) { // NOLINT
215 const map_t& tag_map = Instance().tag_map_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected