Added uptime command and utility functions (#648)

* Added uptime command and utility functions

* Don't use NumberFormat it's slower
This commit is contained in:
ipkpjersi authored and GitHub committed 2024-09-21 04:22:26 +01:00
1 parent 4fe3f446a4
commit 43775016ba
3 files changed
+747 -5

No files matched your search

@@ -116,6 +116,7 @@ public class GameEngine {
private final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
private final static Lock lock = new ReentrantLock();
public static ControlPanel panel;
private static long serverStartTime;
static {
shutdownServer = false;
@@ -123,6 +124,7 @@ public class GameEngine {
public static void main(java.lang.String[] args)
throws NullPointerException, IOException {
serverStartTime = System.currentTimeMillis();
if (NetworkConstants.RSA_EXPONENT != Constants.RSA_EXPONENT) {
NetworkConstants.RSA_EXPONENT = Constants.RSA_EXPONENT;
NetworkConstants.RSA_MODULUS = Constants.RSA_MODULUS;
@@ -316,4 +318,8 @@ public class GameEngine {
public static boolean playerExecuted = false;
private static BufferedReader minuteFile;
public static long getServerStartTime() {
return serverStartTime;
}
}