Fixed AFK time calculation of query results

This commit is contained in:
Risto Lahtela 2021-02-12 13:11:57 +02:00
parent e3cdf76d50
commit 15cbbd86a1

View File

@ -867,7 +867,7 @@ public class SessionQueries {
.put("total_playtime", playtime)
.put("average_playtime", playerCount != 0 ? playtime / playerCount : -1L)
.put("total_afk_playtime", playtime - activePlaytime)
.put("average_afk_playtime", playerCount != 0 ? playtime - activePlaytime / playerCount : -1L)
.put("average_afk_playtime", playerCount != 0 ? (playtime - activePlaytime) / playerCount : -1L)
.put("total_active_playtime", activePlaytime)
.put("average_active_playtime", playerCount != 0 ? activePlaytime / playerCount : -1L)
.put("total_sessions", sessionCount)