• I'm working on support for an as un-yet supported board and am making progress. During my unit testing, I am finding that something odd is happening with numbers. For example, I ran the following function:

    var x=1; setInterval(function() {x=x+1;}, 1000);

    Expecting to find that the function would be called every second. Instead, I seem to find it being called very, very fast. When I run dump(), I find the following:

    setInterval(function () {x=x+1;}, 8.855);

    which as you can see, the last parameter has been changed. Digging further, I found the function called:

    JsVar *_jswrap_interface_setTimeoutOrInterval(­JsVar *func, JsVarFloat interval, JsVar *args, bool isTimeout)

    and added a logging statement to print the value of "interval" when it is called. What is logged is:


    I'm not sure where to go next. Apparently something is wrong in my setup. My processor is the xtensa lx106 (ESP8266) which I believe is a 32bit device. I sense I may be mixing 64bit processing and 32bit processing ... but haven't seen where yet.



Avatar for Kolban @Kolban started