Short Delay in Code

I need a 5ms delay in code between an operation. The “delay” and “call_delay” functions appear to have resolution in seconds as far as I can tell. How can I accomplish this?

You can use luup.sleep(5) but I don’t know how accurate the 5ms delay will be…