LUA | "helpers.delay" - Can't get the logic behind it

I tried to work with “helpers.delay” to create small kind of breaks between sent data.
Because sometimes I still had the feeling that not all of my data was being sent correctly I checked the behaviour using a MIDI Monitor. The following screenshot shows the time stamps in the left two columns and an excerpt of my LUA script in the right column.

The first column was recorded with a delay of 50, the second with 5000 to make it obvious. I can’t recognize a reproducible delay between the time stamps. From the overall behaviour I just can recognize that the function itself is delayed after calling it with the setting “5000”.

Can someone please enlighten me where I went wrong or how this is meant to work?

Thanks in advance.