diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-29 17:13:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-29 17:13:05 +0200 |
commit | ee10afcfabfce801deb7b07882674264f3892390 (patch) | |
tree | fe4e42933631f648edd158898d5889970dc13da5 | |
parent | 927ef9f2f233b616d66e736dc19cd7e4d62dfcc7 (diff) | |
download | prosody-ee10afcfabfce801deb7b07882674264f3892390.tar.gz prosody-ee10afcfabfce801deb7b07882674264f3892390.zip |
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.
-rw-r--r-- | net/server_epoll.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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; |