Round ping to nearest whole number

This commit is contained in:
Manevolent
2018-08-11 12:36:37 -04:00
parent 2666e940e8
commit 5a440c890f
2 changed files with 1 additions and 5 deletions
@@ -1,4 +0,0 @@
package com.github.manevolent.ts3j.protocol.packet.statistics;
public class TimedMeasurement {
}
@@ -112,7 +112,7 @@ public class LocalTeamspeakClientSocket
Pair<Double, Double> ping = getPing(); Pair<Double, Double> ping = getPing();
response.add(new CommandSingleParameter("connection_ping", response.add(new CommandSingleParameter("connection_ping",
Double.toString(Math.round(ping.getKey() * 1000D * 1000D) / 1000D))); Double.toString(Math.round(ping.getKey() * 1000D))));
response.add(new CommandSingleParameter("connection_ping_deviation", response.add(new CommandSingleParameter("connection_ping_deviation",
Double.toString(Math.round(ping.getValue() * 1000D * 1000D) / 1000D))); Double.toString(Math.round(ping.getValue() * 1000D * 1000D) / 1000D)));