From ecad4a20de3420ec5ffbbcdd96d122ed34e532a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Jul 2014 00:22:21 +0200 Subject: manpage: lua: document timer timeout and oneshot fields Might be useful for scripts, so document them. (Which means scripts are allowed to use them, without risking breakage.) --- DOCS/man/lua.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 80467f8f8c..0ab53f0231 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -299,6 +299,20 @@ The ``mp`` module is preloaded, although it can be loaded manually with with ``add_timeout()``), this starts the timer from the beginning, using the initially configured timeout. + ``timeout`` (RW) + This field contains the current timeout period. This value is not + updated as time progresses. It's only used to calculate when the + timer should fire next when the timer expires. + + If you write this, you can call ``t:kill() ; t:resume()`` to reset + the current timeout to the new one. (``t:stop()`` won't use the + new timeout.) + + ``oneshot`` (RW) + Whether the timer is periodic (``false``) or fires just once + (``true``). This value is used when the timer expires (but before + the timer calback function fn is run). + ``mp.get_opt(key)`` Return a setting from the ``--lua-opts`` option. It's up to the user and -- cgit v1.2.3