aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/api/0011-Timings-v2.patch26
1 files changed, 16 insertions, 10 deletions
diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch
index 928003f621..5cee947294 100644
--- a/patches/api/0011-Timings-v2.patch
+++ b/patches/api/0011-Timings-v2.patch
@@ -3,8 +3,6 @@ From: Aikar <[email protected]>
Date: Mon, 29 Feb 2016 18:48:17 -0600
Subject: [PATCH] Timings v2
-TODO: Add #isStopping to FullServerTickHandler#stopTiming in patch 191
-expose isRunning
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
@@ -274,10 +272,10 @@ index 0000000000000000000000000000000000000000..a3ad690691eb5537a565d7ba684354ac
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
-index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2ca7c44f0
+index 0000000000000000000000000000000000000000..421be8a6f9a65596ac8eab071e6ee57533d02718
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,94 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -319,14 +317,17 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
+ * @return Timing
+ */
+ @NotNull
-+ Timing startTiming();
++ default Timing startTiming() {
++ return this;
++ }
+
+ /**
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
+ *
+ * Will automatically be called when this Timing is used with try-with-resources
+ */
-+ void stopTiming();
++ default void stopTiming() {
++ }
+
+ /**
+ * Starts timing the execution until {@link #stopTiming()} is called.
@@ -336,7 +337,9 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
+ * @return Timing
+ */
+ @NotNull
-+ Timing startTimingIfSync();
++ default Timing startTimingIfSync() {
++ return this;
++ }
+
+ /**
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
@@ -345,13 +348,15 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
+ *
+ * But only if we are on the primary thread.
+ */
-+ void stopTimingIfSync();
++ default void stopTimingIfSync() {
++ }
+
+ /**
+ * @deprecated Doesn't do anything - Removed
+ */
+ @Deprecated
-+ void abort();
++ default void abort() {
++ }
+
+ /**
+ * Used internally to get the actual backing Handler in the case of delegated Handlers
@@ -362,7 +367,8 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2
+ TimingHandler getTimingHandler();
+
+ @Override
-+ void close();
++ default void close() {
++ }
+}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
new file mode 100644