From 6a9f8a7615ab27d9619ba606c1fce5e2a3a6253d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 21 Oct 2014 14:40:00 +0100 Subject: Compile fix? --- Tools/ProtoProxy/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'Tools/ProtoProxy') diff --git a/Tools/ProtoProxy/CMakeLists.txt b/Tools/ProtoProxy/CMakeLists.txt index bc3923d90..b136a10ba 100644 --- a/Tools/ProtoProxy/CMakeLists.txt +++ b/Tools/ProtoProxy/CMakeLists.txt @@ -57,13 +57,11 @@ set(SHARED_OSS_SRC ../../src/OSSupport/CriticalSection.cpp ../../src/OSSupport/File.cpp ../../src/OSSupport/IsThread.cpp - ../../src/OSSupport/Timer.cpp ) set(SHARED_OSS_HDR ../../src/OSSupport/CriticalSection.h ../../src/OSSupport/File.h ../../src/OSSupport/IsThread.h - ../../src/OSSupport/Timer.h ) flatten_files(SHARED_SRC) flatten_files(SHARED_HDR) -- cgit v1.2.3 From 6382989ba08727898587f34f505a03a9035511a2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 23 Nov 2014 14:22:05 +0000 Subject: Compilation fixes --- Tools/ProtoProxy/Connection.cpp | 4 ++-- Tools/ProtoProxy/Connection.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'Tools/ProtoProxy') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index eaf4fab02..fe61b37d1 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -189,7 +189,7 @@ cConnection::cConnection(SOCKET a_ClientSocket, cServer & a_Server) : m_Server(a_Server), m_ClientSocket(a_ClientSocket), m_ServerSocket(-1), - m_BeginTick(m_Timer.GetNowTime()), + m_BeginTick(std::chrono::steady_clock::now()), m_ClientState(csUnencrypted), m_ServerState(csUnencrypted), m_Nonce(0), @@ -436,7 +436,7 @@ bool cConnection::RelayFromClient(void) double cConnection::GetRelativeTime(void) { - return (double)(m_Timer.GetNowTime() - m_BeginTick) / 1000; + return std::chrono::duration_cast(std::chrono::steady_clock::now() - m_BeginTick).count() / 1000; } diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index 1fc9536de..c79273f8a 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -10,7 +10,6 @@ #pragma once #include "ByteBuffer.h" -#include "OSSupport/Timer.h" #include "PolarSSL++/AesCfb128Decryptor.h" #include "PolarSSL++/AesCfb128Encryptor.h" @@ -37,8 +36,7 @@ class cConnection SOCKET m_ClientSocket; SOCKET m_ServerSocket; - cTimer m_Timer; - long long m_BeginTick; // Tick when the relative time was first retrieved (used for GetRelativeTime()) + std::chrono::steady_clock::time_point m_BeginTick; // Tick when the relative time was first retrieved (used for GetRelativeTime()) enum eConnectionState { -- cgit v1.2.3 From ed99216ba4cff29b2621d89e7fad6a05cf276624 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 4 Dec 2014 22:51:40 +0100 Subject: Tools: Removed unused Timer.* file from CMakeLists.txt. --- Tools/ProtoProxy/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'Tools/ProtoProxy') diff --git a/Tools/ProtoProxy/CMakeLists.txt b/Tools/ProtoProxy/CMakeLists.txt index fc8721da0..cca0c1b8b 100644 --- a/Tools/ProtoProxy/CMakeLists.txt +++ b/Tools/ProtoProxy/CMakeLists.txt @@ -58,14 +58,12 @@ set(SHARED_OSS_SRC ../../src/OSSupport/File.cpp ../../src/OSSupport/IsThread.cpp ../../src/OSSupport/StackTrace.cpp - ../../src/OSSupport/Timer.cpp ) set(SHARED_OSS_HDR ../../src/OSSupport/CriticalSection.h ../../src/OSSupport/File.h ../../src/OSSupport/IsThread.h ../../src/OSSupport/StackTrace.h - ../../src/OSSupport/Timer.h ) if(WIN32) -- cgit v1.2.3