Add total time to done message (#11109)

* Add total time to done message

Previously it would only show the world load time which is misleading

* Add comments
This commit is contained in:
Jason Penilla 2024-07-18 15:33:14 -07:00
parent dc136446fb
commit 870239b8a4

View File

@ -150,7 +150,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // anything at 3+ won't be caught here but also will trip watchdog....
+ // tasks are default scheduled at -1 + delay, and first tick will tick at 1
+ String doneTime = String.format(java.util.Locale.ROOT, "%.3fs", (double) (Util.getNanos() - serverStartTime) / 1.0E9D);
+ LOGGER.info("Done ({})! For help, type \"help\"", doneTime);
+ final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time
+ LOGGER.info("Done (world loading: {}, total: {})! For help, type \"help\"", doneTime, String.format("%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time
+ // Paper end
+
+ org.spigotmc.WatchdogThread.tick(); // Paper