Is it possible you have some other interval or setWatch running in the background that could be keeping it really busy? Maybe try a reset(1) to be sure?
So all that looks pretty good. You'd expect the ~1ms delay because of the time taken to parse and execute setTimeout after the initial Date variable is created.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Is it possible you have some other interval or setWatch running in the background that could be keeping it really busy? Maybe try a
reset(1)
to be sure?From a board I just tried:
So all that looks pretty good. You'd expect the ~1ms delay because of the time taken to parse and execute
setTimeout
after the initial Date variable is created.