]> 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 675e17f45a9e04cca14b8d9e6c82d0c3584c0576..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
@@ -34,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;
                }
        }
@@ -61,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();
                        }