mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
cleanup server code
This commit is contained in:
parent
20a25ffdab
commit
71c7bc38e1
9 changed files with 12 additions and 79 deletions
|
|
@ -346,10 +346,11 @@ public class Session {
|
|||
pingTime.poll();
|
||||
}
|
||||
long sum = 0;
|
||||
for (Long time :pingTime) {
|
||||
for (Long time : pingTime) {
|
||||
sum += time;
|
||||
}
|
||||
pingInfo = lastPing + " (Av: " + (milliSeconds > 0 ? milliSeconds + "ms":"<1ms")+")";
|
||||
long avg = sum / pingTime.size();
|
||||
pingInfo = lastPing + " (Av: " + (avg > 0 ? avg + "ms":"<1ms")+")";
|
||||
}
|
||||
|
||||
public String getPingInfo() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue