Software /
code /
prosody
Changeset
10489:fabe50ea39f2
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 08 Dec 2019 13:38:48 +0100 |
parents | 10488:03ff1e614b4d |
children | 10490:c9cff02c0528 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sat Dec 07 22:55:51 2019 +0100 +++ b/plugins/mod_admin_telnet.lua Sun Dec 08 13:38:48 2019 +0100 @@ -1265,7 +1265,6 @@ 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 @@ 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;