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 | 158be3a8f16ff6f713d216e450e23a23e1f577b2 (patch) | |
tree | 2a7cd35e54aa884bac6a93a6d0bc4ec2e9373a35 | |
parent | 655294f93e53175928cf6523b82952134e268495 (diff) | |
download | prosody-158be3a8f16ff6f713d216e450e23a23e1f577b2.tar.gz prosody-158be3a8f16ff6f713d216e450e23a23e1f577b2.zip |
net.server_epoll: Remove unused function for adding timer at absolute time
This won't make sense if we switch to monotonic time
-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; |