Interesting - thanks. That looks like a regression - I'll create a bug for it and will see if I can get it done for the next release.
When you're using debounce you're not going to get a very accurate time anyway though given all the bouncing. In this case, why not just use the getTime() function?
Granted getting button state is more of a pain, but the best bet for now is just to use digitalRead(button) as the watch will only have been called if the button state has been stable for a while.
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.
Interesting - thanks. That looks like a regression - I'll create a bug for it and will see if I can get it done for the next release.
When you're using debounce you're not going to get a very accurate time anyway though given all the bouncing. In this case, why not just use the
getTime()
function?Granted getting button state is more of a pain, but the best bet for now is just to use
digitalRead(button)
as the watch will only have been called if the button state has been stable for a while.