Move watchdog and timings code to tick method, not tick loop itself.

By: md_5 <git@md-5.net>
This commit is contained in:
Spigot
2014-01-22 19:23:59 +11:00
parent 975187b00f
commit df37e6e342
7 changed files with 45 additions and 49 deletions

View File

@@ -1,22 +1,14 @@
From 6e7e1bc596979eeb5c12bd2dbad8243610597206 Mon Sep 17 00:00:00 2001
From c746e94351236fc5cc57da30acf90fced3e22fa8 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7b6e83c..839c2b1 100644
index b082ad2..1e83999 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -463,6 +463,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.N = true;
SpigotTimings.serverTickTimer.stopTiming();
org.spigotmc.CustomTimingsHandler.tick();
+ org.spigotmc.WatchdogThread.tick();
}
} else {
this.a((CrashReport) null);
@@ -488,6 +489,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
@@ -485,6 +485,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.a(crashreport);
} finally {
try {
@@ -24,6 +16,14 @@ index 7b6e83c..839c2b1 100644
this.stop();
this.isStopped = true;
} catch (Throwable throwable1) {
@@ -675,6 +676,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
SpigotTimings.tickablesTimer.stopTiming(); // Spigot
this.methodProfiler.b();
+ org.spigotmc.WatchdogThread.tick(); // Spigot
SpigotTimings.serverTickTimer.stopTiming(); // Spigot
org.spigotmc.CustomTimingsHandler.tick(); // Spigot
}
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
new file mode 100644
index 0000000..a8840c9