diff options
author | wm4 <wm4@nowhere> | 2014-03-01 00:37:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-01 00:37:57 +0100 |
commit | 0ad267c1d5f27a74f70d49e89a2a2bede77f9ff6 (patch) | |
tree | 89b676cd1b6dc9a2a5ce3fca02df107a79cebee5 | |
parent | 1f8a400ad746eb3b03b243c53104f39f18488a94 (diff) | |
download | mpv-0ad267c1d5f27a74f70d49e89a2a2bede77f9ff6.tar.bz2 mpv-0ad267c1d5f27a74f70d49e89a2a2bede77f9ff6.tar.xz |
lua: fix use of renamed function
Apparently this was overlooked when get_timer was renamed to get_time.
-rw-r--r-- | player/lua/defaults.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 0a04e26761..f0b2b79776 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -155,7 +155,7 @@ function mp.add_periodic_timer(seconds, cb) timeout = seconds, cb = cb, oneshot = false, - next_deadline = mp.get_timer() + seconds, + next_deadline = mp.get_time() + seconds, } timers[t] = t return t @@ -186,7 +186,7 @@ local function process_timers() if not timer then return end - local wait = timer.next_deadline - mp.get_timer() + local wait = timer.next_deadline - mp.get_time() if wait > 0 then return wait else @@ -195,7 +195,7 @@ local function process_timers() end timer.cb() if not timer.oneshot then - timer.next_deadline = mp.get_timer() + timer.timeout + timer.next_deadline = mp.get_time() + timer.timeout end end end |