You are reading a single comment by @graf and its replies. Click here to read the full conversation.
  • Turns out setWatch and setTimeout IDs are shared so that's where value 2 is coming from (watch ID is 1).

    If I add another watch for btnPin (falling) then the timeout ID has value 3 and it's growing +3 every time. That means the ID's value can grow very fast if I have a bunch of timers/watches that I want to add or remove dynamically.

    And that's just the ID's value growing, the number of timers is the same as far as I understand.

About

Avatar for graf @graf started