mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 09:19:38 +01:00
26 lines
972 B
Diff
26 lines
972 B
Diff
|
From 582c0de7289fb70e00150ae60d41ec6b7730d1c9 Mon Sep 17 00:00:00 2001
|
||
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||
|
Date: Wed, 26 Oct 2016 15:49:28 -0500
|
||
|
Subject: [PATCH] Add debug logging to Timings enable setter
|
||
|
|
||
|
Potentially temporary, will be merged back into main Timings patch if not.
|
||
|
`java -Dtimings.throwOnChange=true -jar paperclip.jar`
|
||
|
|
||
|
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||
|
index 4e5cf35..bef7cf7 100644
|
||
|
--- a/src/main/java/co/aikar/timings/Timings.java
|
||
|
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||
|
@@ -128,6 +128,9 @@ public final class Timings {
|
||
|
public static void setTimingsEnabled(boolean enabled) {
|
||
|
timingsEnabled = enabled;
|
||
|
reset();
|
||
|
+ if (Boolean.getBoolean("timings.throwOnChange")) {
|
||
|
+ new RuntimeException("The enable state of timings has been changed to: " + enabled).printStackTrace();
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
--
|
||
|
2.10.0.windows.1
|
||
|
|