mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 10:11:30 +02:00
Renamed getPingTime() to getPingMs() in Agent.h, etc.
This commit is contained in:
parent
0aa3227228
commit
a5c6cee433
3 changed files with 7 additions and 7 deletions
|
@ -2302,11 +2302,11 @@ void Application::displayStats() {
|
||||||
Agent *voxelServerAgent = agentList->soloAgentOfType(AGENT_TYPE_VOXEL_SERVER);
|
Agent *voxelServerAgent = agentList->soloAgentOfType(AGENT_TYPE_VOXEL_SERVER);
|
||||||
|
|
||||||
if (audioMixerAgent != NULL)
|
if (audioMixerAgent != NULL)
|
||||||
pingAudio = audioMixerAgent->getPingTime();
|
pingAudio = audioMixerAgent->getPingMs();
|
||||||
if (avatarMixerAgent != NULL)
|
if (avatarMixerAgent != NULL)
|
||||||
pingAvatar = avatarMixerAgent->getPingTime();
|
pingAvatar = avatarMixerAgent->getPingMs();
|
||||||
if (voxelServerAgent != NULL)
|
if (voxelServerAgent != NULL)
|
||||||
pingVoxel = voxelServerAgent->getPingTime();
|
pingVoxel = voxelServerAgent->getPingMs();
|
||||||
|
|
||||||
char pingStats[200];
|
char pingStats[200];
|
||||||
sprintf(pingStats, "Ping audio/avatar/voxel: %d / %d / %d ", pingAudio, pingAvatar, pingVoxel);
|
sprintf(pingStats, "Ping audio/avatar/voxel: %d / %d / %d ", pingAudio, pingAvatar, pingVoxel);
|
||||||
|
|
|
@ -63,8 +63,8 @@ public:
|
||||||
float getAverageKilobitsPerSecond();
|
float getAverageKilobitsPerSecond();
|
||||||
float getAveragePacketsPerSecond();
|
float getAveragePacketsPerSecond();
|
||||||
|
|
||||||
int getPingTime() { return _pingMs; };
|
int getPingMs() const { return _pingMs; };
|
||||||
void setPingTime(int pingMs) { _pingMs = pingMs; };
|
void setPingMs(int pingMs) { _pingMs = pingMs; };
|
||||||
|
|
||||||
static void printLog(Agent const&);
|
static void printLog(Agent const&);
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -80,9 +80,9 @@ AgentList::~AgentList() {
|
||||||
void AgentList::timePingReply(sockaddr *agentAddress, unsigned char *packetData) {
|
void AgentList::timePingReply(sockaddr *agentAddress, unsigned char *packetData) {
|
||||||
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
for(AgentList::iterator agent = begin(); agent != end(); agent++) {
|
||||||
if (socketMatch(agent->getPublicSocket(), agentAddress) ||
|
if (socketMatch(agent->getPublicSocket(), agentAddress) ||
|
||||||
socketMatch(agent->getLocalSocket(), agentAddress)) {
|
socketMatch(agent->getLocalSocket(), agentAddress)) {
|
||||||
int pingTime = usecTimestampNow() - *(long long *)(packetData + 1);
|
int pingTime = usecTimestampNow() - *(long long *)(packetData + 1);
|
||||||
agent->setPingTime(pingTime / 1000);
|
agent->setPingMs(pingTime / 1000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue