From 870239b8a4fbe07ece16cb653d5e194b830566dd Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Thu, 18 Jul 2024 15:33:14 -0700
Subject: [PATCH] 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
---
 patches/server/Improved-Watchdog-Support.patch | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/patches/server/Improved-Watchdog-Support.patch b/patches/server/Improved-Watchdog-Support.patch
index 1175ad714f..9a5b45de0b 100644
--- a/patches/server/Improved-Watchdog-Support.patch
+++ b/patches/server/Improved-Watchdog-Support.patch
@@ -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