feat: 修改事件lag提示

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-07-14 15:47:13 +08:00
parent dda778c61f
commit bd79d2013a

View File

@ -71,7 +71,7 @@ public class ListenerInjector implements EventExecutor {
final String en = event.getEventName(); final String en = event.getEventName();
final long lag = end - start; final long lag = end - start;
if (lag / 1000000 > 10) { if (lag / 1000000 > 10) {
PluginKit.sc("§6[§bYum §a能耗监控§6] §c注意! §6插件 §b" + plugin.getName() + " §6处理 §d" + event.getEventName() + " §6事件时§c耗时超过 §410ms!"); PluginKit.sc("§6[§bYum §a能耗监控§6] §c注意! §6插件 §b" + plugin.getName() + " §6处理 §d" + event.getEventName() + " §6事件时§c耗时 §4" + lag / 1000000 + "ms!");
} }
if (eventTotalTime.containsKey(en)) { if (eventTotalTime.containsKey(en)) {
eventTotalTime.put(en, eventTotalTime.get(en) + lag); eventTotalTime.put(en, eventTotalTime.get(en) + lag);