MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / getRelative

Method getRelative

Libraries/Time/Time.cpp:181–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181SC::Time::Relative SC::Time::HighResolutionCounter::getRelative() const
182{
183#if SC_PLATFORM_WINDOWS
184 return Relative::fromSeconds(static_cast<double>(part1) / part2);
185#else
186 constexpr int32_t secondsToNanoseconds = 1000000000;
187 return Relative::fromSeconds(static_cast<double>(part1) + static_cast<double>(part2) / secondsToNanoseconds);
188#endif
189}
190
191SC::Time::Nanoseconds SC::Time::HighResolutionCounter::toNanoseconds() const
192{

Callers 2

subtractApproximateMethod · 0.80

Calls

no outgoing calls

Tested by 1