From 3c0e08ee71221624ace7778e84ad80212c1615c1 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 30 Aug 2013 10:10:56 +0200 Subject: ProtoProxy: Uses cTimer for the timing information. Previously used clock() is not suitable for the task, unfortunately it worked in MSVC. --- Tools/ProtoProxy/Connection.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Tools/ProtoProxy/Connection.cpp') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index 5a9300c2f..4e989d7ae 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -241,7 +241,7 @@ cConnection::cConnection(SOCKET a_ClientSocket, cServer & a_Server) : m_Server(a_Server), m_ClientSocket(a_ClientSocket), m_ServerSocket(-1), - m_BeginTick(clock()), + m_BeginTick(m_Timer.GetNowTime()), m_ClientState(csUnencrypted), m_ServerState(csUnencrypted), m_Nonce(0), @@ -478,8 +478,7 @@ bool cConnection::RelayFromClient(void) double cConnection::GetRelativeTime(void) { - return (double)(clock() - m_BeginTick) / CLOCKS_PER_SEC; - + return (double)(m_Timer.GetNowTime() - m_BeginTick) / 1000; } -- cgit v1.2.3