mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 16:50:17 +01:00
25 lines
962 B
Diff
25 lines
962 B
Diff
From 4d20b34e3e83e6ed7d517b88c05bc77558641412 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.2
|
|
|