diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 88c7666bf..527c0122b 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -365,10 +365,14 @@ bool TreeSocket::LocalPong(const std::string &prefix, std::deque<std::string> &p if (ServerSource) { ServerSource->SetPingFlag(); +#ifndef WIN32 timeval t; gettimeofday(&t, NULL); long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000); ServerSource->rtt = ts - ServerSource->LastPingMsec; +#else + ServerSource->rtt = Instance->Time() - ServerSource->LastPing; +#endif } } else |