Logics for beginners.

This commit is contained in:
asofold 2013-01-23 02:11:22 +01:00
parent 67b3b9ea00
commit fdb58eefca

View File

@ -252,16 +252,12 @@ public class TickTask implements Runnable {
if (exact){ if (exact){
// Attempt to count in the current tick. // Attempt to count in the current tick.
final long time = System.currentTimeMillis(); final long passed = System.currentTimeMillis() - timeLast;
if (time > timeLast){ if (passed > 50){
final long passed = time - timeLast; // Only count in in the case of "overtime".
if (passed > 50){ covered += 50;
// Only count in in the case of "overtime". sum += passed;
covered += 50;
sum += passed;
}
} }
} }
return (float) sum / (float) covered; return (float) sum / (float) covered;