mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-29 19:01:22 +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){
|
||||
// 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;
|
||||
|
Loading…
Reference in New Issue
Block a user