Ok, I'm pretty sure I've figured this out now. It's definitely a firmware issue that's been around for a while I think.
In fact if you:
var dt = new Date();setTimeout(function(){console.logĀ(new Date() - dt);},100);
It's to do with the device sleeping - you probably don't notice it in STM32 boards because they don't sleep when you're connected via USB
@Gordon started
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.
Ok, I'm pretty sure I've figured this out now. It's definitely a firmware issue that's been around for a while I think.
In fact if you:
var dt = new Date();setTimeout(function(){console.logĀ(new Date() - dt);},100);
It's to do with the device sleeping - you probably don't notice it in STM32 boards because they don't sleep when you're connected via USB