diff --git a/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java b/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java index bc20a6059..fb79d0a80 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/Velocity.java @@ -4,9 +4,15 @@ import com.velocitypowered.proxy.console.VelocityConsole; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + public class Velocity { private static final Logger logger = LogManager.getLogger(Velocity.class); + private static long startTime; + static { // We use BufferedImage for favicons, and on macOS this puts the Java application in the dock. How inconvenient. // Force AWT to work with its head chopped off. @@ -14,12 +20,15 @@ public class Velocity { } public static void main(String... args) { + startTime = System.currentTimeMillis(); logger.info("Booting up Velocity..."); final VelocityServer server = VelocityServer.getServer(); server.start(); 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))); new VelocityConsole(server).start(); } }