• Ahhhhh, we are on to something.

    Yes. 0.003 is a value that represents msec. But the setInterval() function needs a value that * IS * the number of msec. So a value of 3 would be needed.

    Experience tells me though, as you approach below 20 for instance, that the time to interpret
    and execute a Javascirpt statement (remember we have an interpreter, not compiled 'C' as in Arduino) then print out using console.log() will start to bog down depending on the actual lines of code.

    EDIT:
    getTime() returns a value in seconds

    http://www.espruino.com/Reference#l__glo­bal_getTime

    setInterval() requires a value in msec

    http://www.espruino.com/Reference#l__glo­bal_setInterval

    Check out the link in #29

    Inline 'C' will speed things up. But I don't know if it will solve your specific issue.

About

Avatar for Robin @Robin started