| 5 | namespace engine::debug { |
| 6 | |
| 7 | ScopeTimer::ScopeTimer( |
| 8 | LogLevel level, |
| 9 | std::string_view category, |
| 10 | std::string_view name) |
| 11 | : active_(log_enabled()), |
| 12 | level_(level), |
| 13 | category_(category), |
| 14 | name_(name), |
| 15 | started_(active_ ? std::chrono::steady_clock::now() : std::chrono::steady_clock::time_point{}) {} |
| 16 | |
| 17 | ScopeTimer::~ScopeTimer() { |
| 18 | if (!active_) { |
nothing calls this directly
no test coverage detected