TerryE wrote:The tmr.delay() argument is in µSec, so a delay of 1 µSec is going to look like its not working.
Setting _G.tmr = nil is a bad idea. This will cause tmr to be re-resolved on each reference with the sort of leak that you see.
The leak is showing even if i remove the "tmr = nil" I just added that to see if i got a different result sorry for getting that in the example.
But its good to know that i should not set it up like that.
The thing is that it would not do any difference between having 1us or 1000us
in the example there i set tmr to a local variable.