I've found bug in setSNTP implementation. Now I have simple example. Also I think I know reason.
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.
© Espruino, powered by microcosm.
Report a problem