From 5b5bcedfc7b53b036534ca07b6b8aae2fdebaf60 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 7 Dec 2011 22:28:00 +0000 Subject: [PATCH] Only at least 5 minutes games are counted for statistics. --- .../src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java index 04f13c03c..850afa1d9 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java @@ -124,7 +124,9 @@ public class GameHistoryDAO { try { Connection connection = _dbAccess.getDataSource().getConnection(); try { - PreparedStatement statement = connection.prepareStatement("select count(*) from game_history where end_date>=?"); + // 5 minutes minimum game + long minTime = 1000 * 60 * 5; + PreparedStatement statement = connection.prepareStatement("select count(*) from game_history where end_date>=? and end_date-start_date>" + minTime); try { statement.setLong(1, System.currentTimeMillis() - ms); ResultSet rs = statement.executeQuery();