mirror of
https://github.com/esphome/esphome.git
synced 2026-09-12 15:57:33 +00:00
Shorten comments
This commit is contained in:
@@ -384,10 +384,7 @@ class Application {
|
||||
friend void ::setup();
|
||||
friend void ::original_setup();
|
||||
|
||||
/// Update the cached loop component start time. Used by the scheduler before
|
||||
/// dispatching a queued callback so callers reading
|
||||
/// get_loop_component_start_time() inside the callback observe a fresh value
|
||||
/// instead of one inherited from the prior loop iteration's last component.
|
||||
/// Freshen the cached loop component start time. Called by Scheduler before each dispatch.
|
||||
void set_loop_component_start_time_(uint32_t now) { this->loop_component_start_time_ = now; }
|
||||
|
||||
/// Walk all registered components looking for any whose component_state_
|
||||
|
||||
@@ -772,10 +772,7 @@ Scheduler::SchedulerItem *HOT Scheduler::pop_raw_locked_() {
|
||||
// Helper to execute a scheduler item
|
||||
uint32_t HOT Scheduler::execute_item_(SchedulerItem *item, uint32_t now) {
|
||||
App.set_current_component(item->component);
|
||||
// Freshen the cached loop component start time so callbacks reading
|
||||
// App.get_loop_component_start_time() observe the dispatch time of this
|
||||
// item rather than a stale value from the prior loop iteration's last
|
||||
// component phase.
|
||||
// Freshen so callbacks reading App.get_loop_component_start_time() see this item's dispatch time.
|
||||
App.set_loop_component_start_time_(now);
|
||||
WarnIfComponentBlockingGuard guard{item->component, now};
|
||||
item->callback();
|
||||
|
||||
Reference in New Issue
Block a user