Fix incorect timing of mspt
Move oversleep and all task execution back into the timed area...
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Add tick times API and /mspt command
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/MSPTCommand.java b/src/main/java/com/destroystokyo/paper/MSPTCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000..d0211d4f39
|
||||
index 000000000..d0211d4f3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/MSPTCommand.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -75,7 +75,7 @@ index 0000000000..d0211d4f39
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 6916ed30c4..1c4cd36351 100644
|
||||
index 6916ed30c..1c4cd3635 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
@@ -87,7 +87,7 @@ index 6916ed30c4..1c4cd36351 100644
|
||||
version = getInt("config-version", 20);
|
||||
set("config-version", 20);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 936434110c..2686874f26 100644
|
||||
index bafdc2d91..3dbd75ad0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -103,8 +103,8 @@ index 936434110c..2686874f26 100644
|
||||
private KeyPair I;
|
||||
@Nullable
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.methodProfiler.enter("tallying");
|
||||
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
|
||||
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
||||
long i1 = SystemUtils.getMonotonicNanos();
|
||||
|
||||
+ // Paper start
|
||||
+ tickTimes5s.add(this.ticks, l);
|
||||
@@ -112,9 +112,9 @@ index 936434110c..2686874f26 100644
|
||||
+ tickTimes60s.add(this.ticks, l);
|
||||
+ // Paper end
|
||||
+
|
||||
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
||||
long i1 = SystemUtils.getMonotonicNanos();
|
||||
|
||||
this.circularTimer.a(i1 - i);
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
return SERVER; // Paper
|
||||
}
|
||||
@@ -147,7 +147,7 @@ index 936434110c..2686874f26 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b9a398bc57..53b71b7915 100644
|
||||
index b9a398bc5..53b71b791 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
||||
Reference in New Issue
Block a user