Add flag for checking if task was initialized #1

Open
CommanderRedYT wants to merge 2 commits from CommanderRedYT/patch-1 into main
Showing only changes of commit 47effe79c7 - Show all commits

View File

@@ -23,7 +23,7 @@ public:
const std::chrono::milliseconds &maxElapsed() const { return m_maxElapsed; } const std::chrono::milliseconds &maxElapsed() const { return m_maxElapsed; }
int callCount() const { return m_callCount; } int callCount() const { return m_callCount; }
void setup() const { m_setupCallback(); } void setup() const { m_setupCallback(); m_wasInitialized = true; }
void loop(); void loop();
void pushStats(bool printTask); void pushStats(bool printTask);
@@ -47,5 +47,6 @@ private:
std::chrono::milliseconds m_totalElapsedTemp; std::chrono::milliseconds m_totalElapsedTemp;
std::chrono::milliseconds m_maxElapsedTemp; std::chrono::milliseconds m_maxElapsedTemp;
int m_callCountTemp{}; int m_callCountTemp{};
bool m_wasInitialized{};
}; };
} // namespace espcpputils } // namespace espcpputils