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

Method Duration

tests/catch.hpp:13281–13297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13279
13280public:
13281 explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto)
13282 : m_inNanoseconds(inNanoseconds),
13283 m_units(units) {
13284 if (m_units == Unit::Auto) {
13285 if (m_inNanoseconds < s_nanosecondsInAMicrosecond)
13286 m_units = Unit::Nanoseconds;
13287 else if (m_inNanoseconds < s_nanosecondsInAMillisecond)
13288 m_units = Unit::Microseconds;
13289 else if (m_inNanoseconds < s_nanosecondsInASecond)
13290 m_units = Unit::Milliseconds;
13291 else if (m_inNanoseconds < s_nanosecondsInAMinute)
13292 m_units = Unit::Seconds;
13293 else
13294 m_units = Unit::Minutes;
13295 }
13296
13297 }
13298
13299 auto value() const -> double {
13300 switch (m_units) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected