Added timings command.

By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
Bukkit/Spigot
2012-01-09 01:09:10 -05:00
parent 05581b02a4
commit 387d09faa1
5 changed files with 98 additions and 1 deletions

View File

@ -336,7 +336,9 @@ public final class SimplePluginManager implements PluginManager {
if (eventListeners != null) {
for (RegisteredListener registration : eventListeners) {
try {
long start = System.nanoTime();
registration.callEvent(event);
registration.getPlugin().incTiming(event.getType(), System.nanoTime() - start);
} catch (AuthorNagException ex) {
Plugin plugin = registration.getPlugin();