is it correct that with the code below e.time and e.lastTime are rounded to 3 decimal places
It could just be the way they are converted to strings more than anything else. It's actually surprisingly hard to come up with a good set of rules for outputting floating point numbers as strings without doing things like accidentally outputting 0.999999 instead of 1.
I should look at using the C library functions again - when I started the library functions pulled in loads of extra code and memory usage so I had to write my own, but the situation may have improved now.
I guess if you multiply by 1000 you find you've got all the information there.
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.
It could just be the way they are converted to strings more than anything else. It's actually surprisingly hard to come up with a good set of rules for outputting floating point numbers as strings without doing things like accidentally outputting 0.999999 instead of 1.
I should look at using the C library functions again - when I started the library functions pulled in loads of extra code and memory usage so I had to write my own, but the situation may have improved now.
I guess if you multiply by 1000 you find you've got all the information there.