MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / unitsAsString

Method unitsAsString

extlibs/catch/include/catch/catch.hpp:15529–15545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15527 }
15528 }
15529 auto unitsAsString() const -> std::string {
15530 switch (m_units) {
15531 case Unit::Nanoseconds:
15532 return "ns";
15533 case Unit::Microseconds:
15534 return "us";
15535 case Unit::Milliseconds:
15536 return "ms";
15537 case Unit::Seconds:
15538 return "s";
15539 case Unit::Minutes:
15540 return "m";
15541 default:
15542 return "** internal error **";
15543 }
15544
15545 }
15546 friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
15547 return os << duration.value() << " " << duration.unitsAsString();
15548 }

Callers 1

operator <<Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected