MCPcopy Create free account
hub / github.com/apache/trafficserver / unitsAsString

Method unitsAsString

lib/catch2/catch.hpp:16345–16361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16343 }
16344 }
16345 auto unitsAsString() const -> std::string {
16346 switch (m_units) {
16347 case Unit::Nanoseconds:
16348 return "ns";
16349 case Unit::Microseconds:
16350 return "us";
16351 case Unit::Milliseconds:
16352 return "ms";
16353 case Unit::Seconds:
16354 return "s";
16355 case Unit::Minutes:
16356 return "m";
16357 default:
16358 return "** internal error **";
16359 }
16360
16361 }
16362 friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
16363 return os << duration.value() << ' ' << duration.unitsAsString();
16364 }

Callers 1

operator <<Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected