MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / unitsAsString

Method unitsAsString

tests/catch.hpp:13313–13329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13311 }
13312 }
13313 auto unitsAsString() const -> std::string {
13314 switch (m_units) {
13315 case Unit::Nanoseconds:
13316 return "ns";
13317 case Unit::Microseconds:
13318 return "µs";
13319 case Unit::Milliseconds:
13320 return "ms";
13321 case Unit::Seconds:
13322 return "s";
13323 case Unit::Minutes:
13324 return "m";
13325 default:
13326 return "** internal error **";
13327 }
13328
13329 }
13330 friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
13331 return os << duration.value() << " " << duration.unitsAsString();
13332 }

Callers 1

operator <<Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected