mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	adjust
This commit is contained in:
		| @@ -82,8 +82,6 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type | ||||
|   item->callback = std::move(func); | ||||
|   item->remove = false; | ||||
|  | ||||
|   const auto now = this->millis_(); | ||||
|  | ||||
| #if !defined(USE_ESP8266) && !defined(USE_RP2040) | ||||
|   // Special handling for defer() (delay = 0, type = TIMEOUT) | ||||
|   // ESP8266 and RP2040 are excluded because they don't need thread-safe defer handling | ||||
| @@ -96,6 +94,8 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type | ||||
|   } | ||||
| #endif | ||||
|  | ||||
|   const auto now = this->millis_(); | ||||
|  | ||||
|   // Type-specific setup | ||||
|   if (type == SchedulerItem::INTERVAL) { | ||||
|     item->interval = delay; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user