MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / getFormattedTimeTaken

Method getFormattedTimeTaken

src/thundersvm/util/log.cpp:2624–2634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2622}
2623
2624const base::type::string_t PerformanceTracker::getFormattedTimeTaken(struct timeval startTime) const {
2625 if (ELPP->hasFlag(LoggingFlag::FixedTimeFormat)) {
2626 base::type::stringstream_t ss;
2627 ss << base::utils::DateTime::getTimeDifference(m_endTime,
2628 startTime, m_timestampUnit) << " " << base::consts::kTimeFormats[static_cast<base::type::EnumType>
2629 (m_timestampUnit)].unit;
2630 return ss.str();
2631 }
2632 return base::utils::DateTime::formatTime(base::utils::DateTime::getTimeDifference(m_endTime,
2633 startTime, m_timestampUnit), m_timestampUnit);
2634}
2635
2636#endif // defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
2637

Callers

nothing calls this directly

Calls 1

hasFlagMethod · 0.45

Tested by

no test coverage detected