). Works over here.
What it DOES is simply call your callback function at some time in the future, minimal x timespan from what you specified. In the meantime the cpu simply keeps running, setting a timer function is not blocking execution. So you can install multiple timers and that just works, no problem. It's very comparable to a timer compare interrupt on a "regular" microcontroller. If you're done with your business, just return from all of your functions and the SDK code will make sure the cpu does "nothing" (at least: not on your code) and it will only return to your code when the timer fires. Whether the SDK code will put the cpu in a somewhat lower power sleeping state or not, I cannot confirm, but I assume it does, so it may be beneficial.
I think the timer code inside the SDK is actually built around a list of timers, the (one) hardware timer is programmed to fire when the first next timer function should be called, when that happens, the timer is reprogrammed to fire for the next timer function to be called, etc. So it all revolves around one hardware timer. AFAIK there is only one timer in the esp8266 anyway, so it should be used shared nicely.Statistics: Posted by eriksl — Mon Aug 24, 2015 12:45 am
]]>