comparison mod_statistics/stats.lib.lua @ 6379:f16c0b5e4fa6

mod_statistics: Switch to prosody.util.time.now() to get the current time
author Link Mauve <linkmauve@linkmauve.fr>
date Fri, 30 Jan 2026 15:04:11 +0100
parents 063abaab666f
children 94868c5217a2
comparison
equal deleted inserted replaced
6378:5a76973e4304 6379:f16c0b5e4fa6
22 num, m > 0 and (prefixes:sub(m,m) .. "i") or ""); 22 num, m > 0 and (prefixes:sub(m,m) .. "i") or "");
23 end 23 end
24 end 24 end
25 25
26 local last_cpu_wall, last_cpu_clock; 26 local last_cpu_wall, last_cpu_clock;
27 local get_time = require "socket".gettime; 27 local get_time = require "prosody.util.time".now;
28 28
29 local active_sessions, active_jids = {}, {}; 29 local active_sessions, active_jids = {}, {};
30 local c2s_sessions, s2s_sessions; 30 local c2s_sessions, s2s_sessions;
31 if prosody and prosody.arg then 31 if prosody and prosody.arg then
32 c2s_sessions = module:shared("/*/c2s/sessions"); 32 c2s_sessions = module:shared("/*/c2s/sessions");