mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-23 00:21:43 +01:00
Changes to TPS serverOccupied calculation
- Ignored downtime that started when players were online from the calculation
This commit is contained in:
parent
d10aaa46d0
commit
56ebf0d3f8
@ -140,14 +140,15 @@ public class TPSMutator {
|
||||
tpsData.sort(new TPSComparator());
|
||||
for (TPS tps : tpsData) {
|
||||
long date = tps.getDate();
|
||||
int players = tps.getPlayers();
|
||||
if (lastDate == -1) {
|
||||
lastDate = date;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (players > 0) {
|
||||
activeTime += date - lastDate;
|
||||
int players = tps.getPlayers();
|
||||
long diff = date - lastDate;
|
||||
if (players > 0 && diff <= TimeUnit.MINUTES.toMillis(3L)) {
|
||||
activeTime += diff;
|
||||
}
|
||||
|
||||
lastDate = date;
|
||||
|
Loading…
Reference in New Issue
Block a user