From c03d7dc8a7c35708a39f9c14e2df243e212b283b Mon Sep 17 00:00:00 2001 From: sapier Date: Sat, 26 Apr 2014 01:15:46 +0200 Subject: Add download rate to media progress bar (non http mode only!) Minor coding style fixes --- src/client.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 729640268..a4fabfa61 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2698,6 +2698,18 @@ float Client::getRTT(void) return m_con.getPeerStat(PEER_ID_SERVER,con::AVG_RTT); } +float Client::getCurRate(void) +{ + return ( m_con.getLocalStat(con::CUR_INC_RATE) + + m_con.getLocalStat(con::CUR_DL_RATE)); +} + +float Client::getAvgRate(void) +{ + return ( m_con.getLocalStat(con::AVG_INC_RATE) + + m_con.getLocalStat(con::AVG_DL_RATE)); +} + // IGameDef interface // Under envlock IItemDefManager* Client::getItemDefManager() -- cgit v1.2.3