From d64dc7e1b1e8adf07d19e8f5db2ab6e0d624a88d Mon Sep 17 00:00:00 2001 From: Desour Date: Thu, 24 Oct 2024 14:32:45 +0200 Subject: [PATCH] add example --- doc/lua_api.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/lua_api.md b/doc/lua_api.md index d56fb6ad72a55..8d1616f65f1e0 100644 --- a/doc/lua_api.md +++ b/doc/lua_api.md @@ -6925,6 +6925,11 @@ Timing * `time` is a lower bound. The job is executed in the first server-step that started at least `time` seconds after the last time a server-step started, measured with globalstep dtime. + In particular this can result in relatively large delays if `time` is close + to the server-step dtime. For example, with a target server-step of 0.09 s + (the engine uses the target as a lower bound for the actual server-step + dtime), `minetest.after(0.09, ...)` usually waits two steps, resulting in + a delay of about 0.18 s. * If `time` is `0`, the job is executed in the next step. * `job:cancel()`