net.server_epoll: Remove unused function for adding timer at absolute time
This won't make sense if we switch to monotonic time
--- a/net/server_epoll.lua Sun Dec 08 13:38:48 2019 +0100
+++ b/net/server_epoll.lua Sun Dec 08 13:40:42 2019 +0100
@@ -90,18 +90,14 @@
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 @@
addclient = addclient;
add_task = addtimer;
listen = listen;
- at = at;
loop = loop;
closeall = closeall;
setquitting = setquitting;