You are reading a single comment by @SergeP and its replies. Click here to read the full conversation.
  • I've found bug in setSNTP implementation. Now I have simple example. Also I think I know reason.

    var wifi=require("Wifi");
    var i1=setInterval(()=>console.log(1),2000);­
    var i2=setInterval(()=>console.log(2),3333);­

    After setSNTP call both intervals works as if they are with zero delay.
    I think it happens because SNTP subsystem uses settimeofday() inside by default and so does not change interval times.
    It is possible to redefine SNTP_SET_SYSTEM_TIME macro to call jshSetSystemTime() instead of settimeofday(). I think it will repair the bug. I think also lwipopts.h is good place for it.


Avatar for SergeP @SergeP started