From d828652f248f152c5794a7d3a41e5732a5327e36 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Tue, 13 Jul 2021 13:11:32 +0300 Subject: lua: fix timers comment (no-op) process_timers() doesn't return an absolute time. It returned delta>0 or nil before f73814b1 , and since f73814b1 it can also return 0. --- player/lua/defaults.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'player/lua') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index a1deca28ba..de28409c0e 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -330,8 +330,9 @@ function mp.get_next_timeout() return timer.next_deadline - now end --- Run timers that have met their deadline. --- Return: next absolute time a timer expires as number, or nil if no timers +-- Run timers that have met their deadline at the time of invocation. +-- Return: time>0 in seconds till the next due timer, 0 if there are due timers +-- (aborted to avoid infinite loop), or nil if no timers local function process_timers() local t0 = nil while true do -- cgit v1.2.3