MCPcopy Create free account
hub / github.com/Profactor/cv-plot / unitsAsString

Method unitsAsString

CvPlot/ext/catch2/inc/catch.hpp:16006–16022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16004 }
16005 }
16006 auto unitsAsString() const -> std::string {
16007 switch (m_units) {
16008 case Unit::Nanoseconds:
16009 return "ns";
16010 case Unit::Microseconds:
16011 return "us";
16012 case Unit::Milliseconds:
16013 return "ms";
16014 case Unit::Seconds:
16015 return "s";
16016 case Unit::Minutes:
16017 return "m";
16018 default:
16019 return "** internal error **";
16020 }
16021
16022 }
16023 friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
16024 return os << duration.value() << ' ' << duration.unitsAsString();
16025 }

Callers 1

operator <<Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected