From fdb58eefca098fb1d31edb43e0688291ebaa0e6c Mon Sep 17 00:00:00 2001 From: asofold Date: Wed, 23 Jan 2013 02:11:22 +0100 Subject: [PATCH] Logics for beginners. --- .../nocheatplus/utilities/TickTask.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/utilities/TickTask.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/utilities/TickTask.java index 39feca85..d0da7059 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/utilities/TickTask.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/utilities/TickTask.java @@ -252,16 +252,12 @@ public class TickTask implements Runnable { if (exact){ // Attempt to count in the current tick. - final long time = System.currentTimeMillis(); - if (time > timeLast){ - final long passed = time - timeLast; - if (passed > 50){ - // Only count in in the case of "overtime". - covered += 50; - sum += passed; - } + final long passed = System.currentTimeMillis() - timeLast; + if (passed > 50){ + // Only count in in the case of "overtime". + covered += 50; + sum += passed; } - } return (float) sum / (float) covered;