!= -> ==, fix timings

This commit is contained in:
md_5 2013-06-04 17:58:08 +10:00
parent fced81e629
commit 9bb9e64939

View File

@ -1,4 +1,4 @@
From b6caa7eeba80ff9a7228c5b7e221561b6d182ad3 Mon Sep 17 00:00:00 2001 From 078fe271c45d21fc28bb6e618093d244c4b307be Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 11:17:05 +1000 Date: Sun, 2 Jun 2013 11:17:05 +1000
Subject: [PATCH] Enchanced Timings Subject: [PATCH] Enchanced Timings
@ -180,7 +180,7 @@ index ea30d83..d905435 100644
eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
new file mode 100644 new file mode 100644
index 0000000..fe6cb42 index 0000000..b2e94b6
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -0,0 +1,174 @@ @@ -0,0 +1,174 @@
@ -314,7 +314,7 @@ index 0000000..fe6cb42
+ public void startTiming() + public void startTiming()
+ { + {
+ // If second condtion fails we are already timing + // If second condtion fails we are already timing
+ if ( Bukkit.getPluginManager().useTimings() && ++timingDepth != 1 ) + if ( Bukkit.getPluginManager().useTimings() && ++timingDepth == 1 )
+ { + {
+ start = System.nanoTime(); + start = System.nanoTime();
+ if ( parent != null && ++parent.timingDepth == 1 ) + if ( parent != null && ++parent.timingDepth == 1 )