net.server_epoll: Remove unused function for adding timer at absolute time
authorKim Alvefur <zash@zash.se>
Sun, 08 Dec 2019 13:40:42 +0100
changeset 10494 c9cff02c0528
parent 10493 fabe50ea39f2
child 10495 6f7a77aff9d5
net.server_epoll: Remove unused function for adding timer at absolute time This won't make sense if we switch to monotonic time
net/server_epoll.lua
--- 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;