Differentiate RejectsUtils from Meteor Utils

This commit is contained in:
StormyBytes
2021-07-18 12:18:02 +07:00
parent b5f720edc2
commit ca2a8198a4
4 changed files with 7 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
package cloudburst.rejects.utils;
import java.util.Timer;
import java.util.TimerTask;
public class RejectsUtils {
public static int CPS = 0;
public static void init() {
new Timer().scheduleAtFixedRate(newTimerTaskFromLambda(() -> CPS = 0), 0, 1000);
}
public static TimerTask newTimerTaskFromLambda(Runnable runnable)
{
return new TimerTask()
{
@Override
public void run()
{
runnable.run();
}
};
}
}