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
commit8ac1c4193c3a63b85e45c08b14cd63a29c5c2fc9 (patch)
treedb1b8c420162eaca12eb187809768aabbd9c0525
parent64614cb420301e20e2c385acc3fbebf3b254a443 (diff)
downloadprosody-8ac1c4193c3a63b85e45c08b14cd63a29c5c2fc9.tar.gz
prosody-8ac1c4193c3a63b85e45c08b14cd63a29c5c2fc9.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;