mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
23 lines
1 KiB
Diff
23 lines
1 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Zach Brown <1254957+zachbr@users.noreply.github.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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/co/aikar/timings/Timings.java
|
||
|
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||
|
@@ -0,0 +0,0 @@ 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();
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
--
|