This commit is contained in:
J. Nick Koston 2025-07-08 09:34:16 -06:00
parent d1609de25a
commit 0097a55eaa
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,4 @@
#include "runtime_stats.h"
#include "esphome/core/defines.h"
#ifdef USE_RUNTIME_STATS
@ -10,6 +9,9 @@ namespace esphome {
namespace runtime_stats {
// Forward declaration to help compiler
class RuntimeStatsCollector;
RuntimeStatsCollector::RuntimeStatsCollector() : log_interval_(60000), next_log_time_(0) {
global_runtime_stats = this;
}

View File

@ -1,5 +1,7 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef USE_RUNTIME_STATS
#include <map>
@ -122,4 +124,4 @@ extern runtime_stats::RuntimeStatsCollector
} // namespace esphome
#endif // USE_RUNTIME_STATS
#endif // USE_RUNTIME_STATS