aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-30 02:31:29 +0200
committerKim Alvefur <zash@zash.se>2020-06-30 02:31:29 +0200
commitdc5f00e62f93566f9f74c6985855c2fdf9ecfd11 (patch)
treedb1b8c420162eaca12eb187809768aabbd9c0525
parent5bafaaa5d711a6e7995f23e931c7b26f6f1b28c3 (diff)
downloadprosody-dc5f00e62f93566f9f74c6985855c2fdf9ecfd11.tar.gz
prosody-dc5f00e62f93566f9f74c6985855c2fdf9ecfd11.zip
net.server_epoll: Expose way to turn monotonic time into wall clock time
-rw-r--r--net/server_epoll.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index e4bf7708..c5d5ec6c 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -904,6 +904,9 @@ return {
add_task = addtimer;
stop = closetimer;
reschedule = reschedule;
+ to_absolute_time = function (t)
+ return t-monotonic()+realtime();
+ end;
};
listen = listen;
loop = loop;