From ee10afcfabfce801deb7b07882674264f3892390 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 29 Jun 2020 17:13:05 +0200 Subject: net.server_epoll: Signal API-compatibilty with util.timer Reduces the overhead of having both util.timer and the timer handling here, since they are very similar and now API-compatible. --- net/server_epoll.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'net') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index fbe11401..b7a11e8b 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -896,6 +896,12 @@ return { addserver = addserver; addclient = addclient; add_task = addtimer; + timer = { + -- API-compatible with util.timer + add_task = addtimer; + stop = closetimer; + reschedule = reschedule; + }; listen = listen; loop = loop; closeall = closeall; -- cgit v1.2.3