aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.md
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-08 12:13:38 +0100
committercbdev <cb@cbcdn.com>2020-03-08 12:13:38 +0100
commitf9829ae90d4017940047b561e412c6eb7f431adb (patch)
treec94f4bcb67bd4680343303cfef998999acb314ea /backends/lua.md
parentdde2cca435b2c314a08024825b1daffa6437b947 (diff)
downloadmidimonster-f9829ae90d4017940047b561e412c6eb7f431adb.tar.gz
midimonster-f9829ae90d4017940047b561e412c6eb7f431adb.tar.bz2
midimonster-f9829ae90d4017940047b561e412c6eb7f431adb.zip
Implement timestamp() callback for Lua
Diffstat (limited to 'backends/lua.md')
-rw-r--r--backends/lua.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/lua.md b/backends/lua.md
index 0c592b7..db4cf39 100644
--- a/backends/lua.md
+++ b/backends/lua.md
@@ -17,6 +17,7 @@ The following functions are provided within the Lua interpreter for interaction
| `input_value(string)` | `input_value("foo")` | Get the last input value on a channel |
| `output_value(string)` | `output_value("bar")` | Get the last output value on a channel |
| `input_channel()` | `print(input_channel())` | Returns the name of the input channel whose handler function is currently running or `nil` if in an `interval`'ed function (or the initial parse step) |
+| `timestamp()` | `print(timestamp())` | Returns the core timestamp for this iteration with millisecond resolution. This is not a performance timer, but intended for timeouting, etc |
Example script:
```
@@ -58,8 +59,8 @@ lua1.foo > lua2.bar
#### Known bugs / problems
-Using any of the interface functions (`output`, `interval`, `input_value`, `output_value`, `input_channel`)
-as an input channel name to a Lua instance will not call any handler functions.
+Using any of the interface functions (`output`, `interval`, `input_value`, `output_value`, `input_channel`,
+`timestamp`) as an input channel name to a Lua instance will not call any handler functions.
Using these names as arguments to the output and value interface functions works as intended.
Output values will not trigger corresponding input event handlers unless the channel is mapped