Available since v0.4.0
local sleep = require "sleep"
sleep(millis)The sleep package provides a single function, sleep, that pauses script execution for a specified number of milliseconds. The function is useful for delaying script execution or for simulating slow operations.
sleep(1000) -- sleep for 1 second
NOTE: The sleep function is asynchronous and does not block the overall server's execution. It will only block the operations within the current script invocation context.