10ms is a bit unrealistic, it is too slow for that. Maybe even if you would remove the print calls which are slow you could probably barely run that code in 10ms. you can try to put "jit" there like
Bangle.on("HRM-raw",function(data){ "jit"
to enable JIT compiler, but still - printing (probably over bluetooth?) is slow
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.
10ms is a bit unrealistic, it is too slow for that. Maybe even if you would remove the
print
calls which are slow you could probably barely run that code in 10ms. you can try to put "jit" there liketo enable JIT compiler, but still - printing (probably over bluetooth?) is slow