MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / value

Method value

unittests/catch.hpp:11781–11794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11779 }
11780
11781 auto value() const -> double {
11782 switch (m_units) {
11783 case Unit::Microseconds:
11784 return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMicrosecond);
11785 case Unit::Milliseconds:
11786 return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMillisecond);
11787 case Unit::Seconds:
11788 return m_inNanoseconds / static_cast<double>(s_nanosecondsInASecond);
11789 case Unit::Minutes:
11790 return m_inNanoseconds / static_cast<double>(s_nanosecondsInAMinute);
11791 default:
11792 return static_cast<double>(m_inNanoseconds);
11793 }
11794 }
11795 auto unitsAsString() const -> std::string {
11796 switch (m_units) {
11797 case Unit::Nanoseconds:

Callers 3

parseMethod · 0.45
parseMethod · 0.45
operator <<Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected