zephyr
Top-level helpers available directly on the global `zephyr` table.
2 functions
log
zephyr.log(level, message)Write a line to the host log under the zephyr::lua target.
Parameters
levelstringOne of trace, debug, warn, or error. Any other value logs at info.
messagestringMessage to log.
Returns
nil
Nothing.
Example
lua
zephyr.log("info", "module started")sleep_ms
zephyr.sleep_ms(ms)Asynchronously sleep for the given number of milliseconds.
Parameters
msnumberMilliseconds to sleep.
Returns
nil
Nothing. Yields the current coroutine while sleeping.
Example
lua
zephyr.sleep_ms(250)