Replies: 1 comment
-
Everyting is run from the internal scheduler, even the PLUGIN_TEN_PER_SECOND calls (and everything else) For the loop timer (see setlooptimer_ms command) I do reschedule it based on the set interval and the last set scheduled time.
The IRAM is slightly less of an issue on ESP32, but on ESP8266 you really have not a lot of it. Data locking/synchronization between (RTOS) tasks can become tricky if it has to be done between cores as not all memory can be accessed from both cores. Edit: |
Beta Was this translation helpful? Give feedback.
-
@TD-er I was working on a proof-of-concept of timer events. And i must say, i am pretty impressed on what you implemented in ESPEasy. A efficiënt and light weight timer queue as i would quite ideally have expected it.
Any ideas about the efficiency difference between a timer queue running on xTaskCreatePinnedToCore and one based on a
SIGALRM
or even hardware interrupt timers:https://github.com/khoih-prog/ESP8266TimerInterrupt/blob/master/examples/ISR_Timer_Complex/ISR_Timer_Complex.ino?
From what i see is that the current timer does periodic evaluations. So if i set a timer for 10 seconds, i still get 10x
TIMER_1SEC
evaluations. Whilst a timer queue implemented in the most ideal way, only evaluates for the minimal amount of time necessary. So if my first timer is 10 seconds and my second timer 5 minutes, i only want two evaluations. One after the 10 seconds and one after the 5 minutes (until a earlier timer enters).Beta Was this translation helpful? Give feedback.
All reactions