mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Logics for beginners.
This commit is contained in:
parent
67b3b9ea00
commit
fdb58eefca
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user