• The only things that block when connecting are WIZnet and CC3000. The ESP8266 (via AT commands or when running on ESP8266 itself) doesn't. After that, nothing blocks at all.

    But yes, if something blocks (let's just say a big FOR loop) then setInterval will try and catch up - but it will do so by calling the interval only once around each idle loop.

    So if you have:

    setInterval(a,20);
    setIntervall(b,40);
    

    You'd expect normally it'd do:

    aabaabaabaabaabaabaabaab...
    

    But when catching up it'd do:

    abababababababab ... now caught up ... aabaabaabaab
    

    And yes, to avoid it, just do a setTimeout when executing - but it won't be as accurate.

About

Avatar for Gordon @Gordon started