summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Connection.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 15:22:05 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-23 15:22:05 +0100
commit6382989ba08727898587f34f505a03a9035511a2 (patch)
tree42cc9f37175e636ba55193d4a04f385a0f46987a /Tools/ProtoProxy/Connection.cpp
parentUpdate GCC on Travis (diff)
downloadcuberite-6382989ba08727898587f34f505a03a9035511a2.tar
cuberite-6382989ba08727898587f34f505a03a9035511a2.tar.gz
cuberite-6382989ba08727898587f34f505a03a9035511a2.tar.bz2
cuberite-6382989ba08727898587f34f505a03a9035511a2.tar.lz
cuberite-6382989ba08727898587f34f505a03a9035511a2.tar.xz
cuberite-6382989ba08727898587f34f505a03a9035511a2.tar.zst
cuberite-6382989ba08727898587f34f505a03a9035511a2.zip
Diffstat (limited to 'Tools/ProtoProxy/Connection.cpp')
-rw-r--r--Tools/ProtoProxy/Connection.cpp4
1 files changed, 2 insertions, 2 deletions
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::milliseconds>(std::chrono::steady_clock::now() - m_BeginTick).count() / 1000;
}