You are reading a single comment by @CamSwords and its replies. Click here to read the full conversation.
  • Maybe! Although from what I can tell the queue size will be 64 events long on an Espruino (32 events long on a board with less flash). IO Events are any work that needs to be done regarding external line interrupts (setWatch), serial (usb and via pins), SPI and I2C. For example, each character received on a Serial read is one IO Event.

    In my use case, my input pin was receiving pulses every 20ms. I got a reading of time between events (event.time - event.lastTime) of 0.053564071 seconds, in which I expect 4 - 6 IO Events to occur due to my pin edge rising / falling. For me to fill the queue I think I would have had to have other events on it too, presumably incoming characters on a serial link, though I'm a bit sceptical now because I thought that my Espruino serial link was only sending characters out.

    One thing I might try is not making my setWatch repeat, just turning it on every now and again might mean less events in the queue for me.

About

Avatar for CamSwords @CamSwords started