Show slow event times in milliseconds

This commit is contained in:
md_5 2020-01-27 17:01:57 +11:00
parent cd7a3ab2b2
commit cf72c3a788

View File

@ -403,9 +403,9 @@ public class PluginManager
long elapsed = System.nanoTime() - start; long elapsed = System.nanoTime() - start;
if ( elapsed > 250000000 ) if ( elapsed > 250000000 )
{ {
ProxyServer.getInstance().getLogger().log( Level.WARNING, "Event {0} took {1}ns to process!", new Object[] ProxyServer.getInstance().getLogger().log( Level.WARNING, "Event {0} took {1}ms to process!", new Object[]
{ {
event, elapsed event, elapsed / 1000000
} ); } );
} }
return event; return event;