3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-06 00:00:47 +01:00

Simplify and improve the startup timer.

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-08-13 07:23:49 -04:00
Ursprung ebdf5854dd
Commit 718f615d3f

Datei anzeigen

@ -4,9 +4,7 @@ import com.velocitypowered.proxy.console.VelocityConsole;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import java.text.SimpleDateFormat; import java.text.DecimalFormat;
import java.util.Date;
import java.util.Locale;
public class Velocity { public class Velocity {
private static final Logger logger = LogManager.getLogger(Velocity.class); private static final Logger logger = LogManager.getLogger(Velocity.class);
@ -28,7 +26,8 @@ public class Velocity {
Runtime.getRuntime().addShutdownHook(new Thread(server::shutdown, "Shutdown thread")); Runtime.getRuntime().addShutdownHook(new Thread(server::shutdown, "Shutdown thread"));
logger.info("Done ({}s)!", new SimpleDateFormat("ss.S", Locale.getDefault()).format(new Date(System.currentTimeMillis() - startTime))); double bootTime = (System.currentTimeMillis() - startTime) / 1000d;
logger.info("Done ({}s)!", new DecimalFormat("#.##").format(bootTime));
new VelocityConsole(server).start(); new VelocityConsole(server).start();
} }
} }