Software /
code /
prosody
Changeset
10490:c9cff02c0528
net.server_epoll: Remove unused function for adding timer at absolute time
This won't make sense if we switch to monotonic time
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 08 Dec 2019 13:40:42 +0100 |
parents | 10489:fabe50ea39f2 |
children | 10491:6f7a77aff9d5 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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;