diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-08 13:40:42 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-08 13:40:42 +0100 |
commit | 516309caeca1b0c74be8d4da5c2494a24587daa4 (patch) | |
tree | 2a7cd35e54aa884bac6a93a6d0bc4ec2e9373a35 /net | |
parent | ab7c35c8e5fc5f85a60beeaebe44aecad6f82027 (diff) | |
download | prosody-516309caeca1b0c74be8d4da5c2494a24587daa4.tar.gz prosody-516309caeca1b0c74be8d4da5c2494a24587daa4.zip |
net.server_epoll: Remove unused function for adding timer at absolute time
This won't make sense if we switch to monotonic time
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 17faa848..8af6f484 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -90,18 +90,14 @@ local function reschedule(t, time) timers:reprioritize(t.id, time); end --- Add absolute timer -local function at(time, f) +-- Add relative timer +local function addtimer(timeout, f) + local time = gettime() + timeout; local timer = { time, f, close = closetimer, reschedule = reschedule, id = nil }; timer.id = timers:insert(timer, time); return timer; end --- Add relative timer -local function addtimer(timeout, f) - return at(gettime() + timeout, f); -end - -- Run callbacks of expired timers -- Return time until next timeout local function runtimers(next_delay, min_wait) @@ -879,7 +875,6 @@ return { addclient = addclient; add_task = addtimer; listen = listen; - at = at; loop = loop; closeall = closeall; setquitting = setquitting; |