summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket2.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-05 19:22:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-05 19:22:10 +0000
commit728a907e887406df109f37e68cafbb3abd2a02e4 (patch)
treed9b339a9c72d83fbca25396234c315c05ae5d6cc /src/modules/m_spanningtree/treesocket2.cpp
parent56b89baf233a7ef85e33b297437ba61e627e423c (diff)
Change latency figures in /map to milliseconds, much more useful for lag measurement than seconds
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7667 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 077350d20..fc6853ba8 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -365,7 +365,10 @@ bool TreeSocket::LocalPong(const std::string &prefix, std::deque<std::string> &p
if (ServerSource)
{
ServerSource->SetPingFlag();
- ServerSource->rtt = Instance->Time() - ServerSource->LastPing;
+ timeval t;
+ gettimeofday(&t, NULL);
+ long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000);
+ ServerSource->rtt = ts - ServerSource->LastPingMsec;
}
}
else