aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-08 13:40:42 +0100
committerKim Alvefur <zash@zash.se>2019-12-08 13:40:42 +0100
commit158be3a8f16ff6f713d216e450e23a23e1f577b2 (patch)
tree2a7cd35e54aa884bac6a93a6d0bc4ec2e9373a35
parent655294f93e53175928cf6523b82952134e268495 (diff)
downloadprosody-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.lua11
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;