diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-08 13:38:48 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-08 13:38:48 +0100 |
commit | ab7c35c8e5fc5f85a60beeaebe44aecad6f82027 (patch) | |
tree | 00e5b3483ea0306d119521d433fc8b8c5ed4c6e5 | |
parent | 65316d3d5aae5b4554e273c75474dfd704e95d7e (diff) | |
download | prosody-ab7c35c8e5fc5f85a60beeaebe44aecad6f82027.tar.gz prosody-ab7c35c8e5fc5f85a60beeaebe44aecad6f82027.zip |
mod_admin_telnet: Avoid using LuaSocket for timestamps
Using util.time will make it easier to move away from LuaSocket if we
ever wanted to do that.
-rw-r--r-- | plugins/mod_admin_telnet.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 8427f811..60f92cda 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -1265,7 +1265,6 @@ function def_env.debug:events(host, event) end function def_env.debug:timers() - local socket = require "socket"; local print = self.session.print; local add_task = require"util.timer".add_task; local h, params = add_task.h, add_task.params; @@ -1293,7 +1292,7 @@ function def_env.debug:timers() if h then local next_time = h:peek(); if next_time then - return true, os.date("Next event at %F %T (in %%.6fs)", next_time):format(next_time - socket.gettime()); + return true, os.date("Next event at %F %T (in %%.6fs)", next_time):format(next_time - time.now()); end end return true; |