/[svn]/hopm/branches/1.1.x/src/stats.c
ViewVC logotype

Diff of /hopm/branches/1.1.x/src/stats.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9860 by michael, Wed Jan 1 10:03:12 2020 UTC revision 9861 by michael, Sat Jan 2 18:38:36 2021 UTC
# Line 34  Line 34 
34  #include "misc.h"  #include "misc.h"
35  #include "config.h"  #include "config.h"
36  #include "stats.h"  #include "stats.h"
37  #include "libopm/src/opm_types.h"  #include "opm_types.h"
38    #include "opm_gettime.h"
39    
40  static time_t STATS_UPTIME;  static time_t STATS_UPTIME;
41  static unsigned int STATS_CONNECTIONS;  static unsigned int STATS_CONNECTIONS;
# Line 67  static struct StatsHash STATS_PROXIES[] Line 68  static struct StatsHash STATS_PROXIES[]
68  void  void
69  stats_init(void)  stats_init(void)
70  {  {
71    time(&STATS_UPTIME);    STATS_UPTIME = opm_gettime();
72  }  }
73    
74  /* stats_openproxy  /* stats_openproxy
# Line 147  stats_dnsblsend(void) Line 148  stats_dnsblsend(void)
148  void  void
149  stats_output(const char *target)  stats_output(const char *target)
150  {  {
151    time_t present;    time_t uptime = opm_gettime() - STATS_UPTIME;
   time_t uptime;  
152    node_t *p;    node_t *p;
153    
   time(&present);  
   uptime = present - STATS_UPTIME;  
   
154    irc_send("PRIVMSG %s :Uptime: %s", target, time_dissect(uptime));    irc_send("PRIVMSG %s :Uptime: %s", target, time_dissect(uptime));
155    
156    LIST_FOREACH(p, OpmItem.blacklists.head)    LIST_FOREACH(p, OpmItem.blacklists.head)

Legend:
Removed from v.9860  
changed lines
  Added in v.9861

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28