MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / ~ScopeTimer

Method ~ScopeTimer

src/framework/debug/profiler.cpp:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 started_(active_ ? std::chrono::steady_clock::now() : std::chrono::steady_clock::time_point{}) {}
16
17ScopeTimer::~ScopeTimer() {
18 if (!active_) {
19 return;
20 }
21 const auto ended = std::chrono::steady_clock::now();
22 const auto micros = std::chrono::duration_cast<std::chrono::microseconds>(ended - started_).count();
23 log_message(level_, category_, name_ + " took " + std::to_string(micros) + " us");
24}
25
26} // namespace engine::debug

Callers

nothing calls this directly

Calls 2

log_messageFunction · 0.85
to_stringFunction · 0.70

Tested by

no test coverage detected