From f64ceb52adef7b32fd3918eb7bd6f7e61c0f1331 Mon Sep 17 00:00:00 2001 From: nox7 <36878742-nox7@users.noreply.gitlab.com> Date: Sun, 3 May 2026 18:27:30 -0500 Subject: [PATCH] Document new async methods for timers --- files/lua_api/openmw/async.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/files/lua_api/openmw/async.lua b/files/lua_api/openmw/async.lua index a8435c5d38..9f148407cc 100644 --- a/files/lua_api/openmw/async.lua +++ b/files/lua_api/openmw/async.lua @@ -33,6 +33,15 @@ -- @param #TimerCallback callback A callback returned by `registerTimerCallback` -- @param arg An argument for `callback`; can be `nil`. +--- +-- Calls callback(arg) in `delay` real time seconds. +-- The callback must be registered in advance. +-- @function [parent=#async] newRealTimeTimer +-- @param self +-- @param #number delay In seconds +-- @param #TimerCallback callback A callback returned by `registerTimerCallback` +-- @param arg An argument for `callback`; can be `nil`. + --- -- Calls `func()` in `delay` simulation seconds. -- The timer will be lost if the game is saved and loaded. @@ -49,6 +58,14 @@ -- @param #number delay -- @param #function func +--- +-- Calls `func()` in `delay` real time seconds. +-- The timer will be lost if the game is saved and loaded. +-- @function [parent=#async] newUnsavableRealTimeTimer +-- @param self +-- @param #number delay In seconds +-- @param #function func + --- -- Wraps a Lua function with a `Callback` object that can be used in async API calls. -- @function [parent=#async] callback