From a5c6cee43349be36f13b83793b6fe1ca46b02a10 Mon Sep 17 00:00:00 2001 From: Mark Peng Date: Fri, 28 Jun 2013 15:33:08 -0700 Subject: [PATCH] Renamed getPingTime() to getPingMs() in Agent.h, etc. --- interface/src/Application.cpp | 6 +++--- libraries/shared/src/Agent.h | 4 ++-- libraries/shared/src/AgentList.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ea035bd2e9..7177ea1813 100755 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2302,11 +2302,11 @@ void Application::displayStats() { Agent *voxelServerAgent = agentList->soloAgentOfType(AGENT_TYPE_VOXEL_SERVER); if (audioMixerAgent != NULL) - pingAudio = audioMixerAgent->getPingTime(); + pingAudio = audioMixerAgent->getPingMs(); if (avatarMixerAgent != NULL) - pingAvatar = avatarMixerAgent->getPingTime(); + pingAvatar = avatarMixerAgent->getPingMs(); if (voxelServerAgent != NULL) - pingVoxel = voxelServerAgent->getPingTime(); + pingVoxel = voxelServerAgent->getPingMs(); char pingStats[200]; sprintf(pingStats, "Ping audio/avatar/voxel: %d / %d / %d ", pingAudio, pingAvatar, pingVoxel); diff --git a/libraries/shared/src/Agent.h b/libraries/shared/src/Agent.h index 41c1e98fd6..bafffb008e 100644 --- a/libraries/shared/src/Agent.h +++ b/libraries/shared/src/Agent.h @@ -63,8 +63,8 @@ public: float getAverageKilobitsPerSecond(); float getAveragePacketsPerSecond(); - int getPingTime() { return _pingMs; }; - void setPingTime(int pingMs) { _pingMs = pingMs; }; + int getPingMs() const { return _pingMs; }; + void setPingMs(int pingMs) { _pingMs = pingMs; }; static void printLog(Agent const&); private: diff --git a/libraries/shared/src/AgentList.cpp b/libraries/shared/src/AgentList.cpp index 398688f206..237b367252 100644 --- a/libraries/shared/src/AgentList.cpp +++ b/libraries/shared/src/AgentList.cpp @@ -80,9 +80,9 @@ AgentList::~AgentList() { void AgentList::timePingReply(sockaddr *agentAddress, unsigned char *packetData) { for(AgentList::iterator agent = begin(); agent != end(); agent++) { if (socketMatch(agent->getPublicSocket(), agentAddress) || - socketMatch(agent->getLocalSocket(), agentAddress)) { + socketMatch(agent->getLocalSocket(), agentAddress)) { int pingTime = usecTimestampNow() - *(long long *)(packetData + 1); - agent->setPingTime(pingTime / 1000); + agent->setPingMs(pingTime / 1000); break; } }