MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / unitsAsString

Method unitsAsString

Bcore/src/main/cpp/Dobby/tests/catch.hpp:11698–11713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11696 }
11697 }
11698 auto unitsAsString() const -> std::string {
11699 switch (m_units) {
11700 case Unit::Nanoseconds:
11701 return "ns";
11702 case Unit::Microseconds:
11703 return "µs";
11704 case Unit::Milliseconds:
11705 return "ms";
11706 case Unit::Seconds:
11707 return "s";
11708 case Unit::Minutes:
11709 return "m";
11710 default:
11711 return "** internal error **";
11712 }
11713 }
11714 friend auto operator<<(std::ostream &os, Duration const &duration) -> std::ostream & {
11715 return os << duration.value() << " " << duration.unitsAsString();
11716 }

Callers 1

operator<<Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected