-
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 usingconsole.log()
will start to bog down depending on the actual lines of code.EDIT:
getTime()
returns a value in secondssetInterval()
requires a value in msecCheck out the link in #29
Inline 'C' will speed things up. But I don't know if it will solve your specific issue.
Haha ^ ^
and I thought gettime() returns in ms. Isn't 0.003 is in ms?