From 5a922fa1607be4b15afe18f592c86b175d8b834a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 1 Feb 2021 14:46:34 -0500 Subject: New upstream version 1.1.10. --- src/stats.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/stats.c') diff --git a/src/stats.c b/src/stats.c index dd0ac8c..af6a545 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2002 Erik Fears - * Copyright (c) 2014-2020 ircd-hybrid development team + * Copyright (c) 2014-2021 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,8 @@ #include "misc.h" #include "config.h" #include "stats.h" -#include "libopm/src/opm_types.h" +#include "opm_types.h" +#include "opm_gettime.h" static time_t STATS_UPTIME; static unsigned int STATS_CONNECTIONS; @@ -67,7 +68,7 @@ static struct StatsHash STATS_PROXIES[] = void stats_init(void) { - time(&STATS_UPTIME); + STATS_UPTIME = opm_gettime(); } /* stats_openproxy @@ -147,13 +148,9 @@ stats_dnsblsend(void) void stats_output(const char *target) { - time_t present; - time_t uptime; + time_t uptime = opm_gettime() - STATS_UPTIME; node_t *p; - time(&present); - uptime = present - STATS_UPTIME; - irc_send("PRIVMSG %s :Uptime: %s", target, time_dissect(uptime)); LIST_FOREACH(p, OpmItem.blacklists.head) -- cgit v1.2.3