]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/pong.cpp
Fix typo.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / pong.cpp
index 27464189781541f4e8c45f7f380c3a444f74f131..9627da8c05be34cd454c88c0cb843bfe3f7c42a6 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -14,7 +14,6 @@
 #include "inspircd.h"
 #include "socket.h"
 #include "xline.h"
-#include "../transport.h"
 #include "socketengine.h"
 
 #include "main.h"
@@ -35,9 +34,7 @@ bool TreeSocket::LocalPong(const std::string &prefix, parameterlist &params)
                if (ServerSource)
                {
                        ServerSource->SetPingFlag();
-                       timeval t;
-                       gettimeofday(&t, NULL);
-                       long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
+                       long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000);
                        ServerSource->rtt = ts - ServerSource->LastPingMsec;
                }
        }
@@ -62,9 +59,7 @@ bool TreeSocket::LocalPong(const std::string &prefix, parameterlist &params)
 
                        if (ServerSource)
                        {
-                               timeval t;
-                               gettimeofday(&t, NULL);
-                               long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
+                               long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000);
                                ServerSource->rtt = ts - ServerSource->LastPingMsec;
                                ServerSource->SetPingFlag();
                        }