Yes it just sits and spins, not my ideal solution either but as you say it is only used to wait 3 seconds for the message to finish displaying. Actually because the lua extensions are run in a separate thread to VLC with low priority it is not burning much CPU.

I am not aware of an os independent sleep function in lua but I am not experienced, this is my first lua project. If you can find anything more suitable please let me know!

There is a clever way of doing this, it is possible to register a callback on "intf-event" and use something like "tick" to delay but this is even more complicated. Can implement if you have strong feelings about it.