[core] Avoid redundant millis() calls in base_automation loop methods (#11676)

This commit is contained in:
J. Nick Koston
2025-11-02 19:40:13 -06:00
committed by GitHub
parent 4a5e6576c8
commit 0f0cd1f706

View File

@@ -103,7 +103,7 @@ template<typename... Ts> class ForCondition : public Condition<Ts...>, public Co
bool check_internal() {
bool cond = this->condition_->check();
if (!cond)
this->last_inactive_ = millis();
this->last_inactive_ = App.get_loop_component_start_time();
return cond;
}
@@ -380,7 +380,7 @@ template<typename... Ts> class WaitUntilAction : public Action<Ts...>, public Co
if (this->num_running_ == 0)
return;
auto now = millis();
auto now = App.get_loop_component_start_time();
this->var_queue_.remove_if([&](auto &queued) {
auto start = std::get<uint32_t>(queued);