From 2320736a928f99beb7870ff4e2f308955198d3a4 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Wed, 26 Feb 2020 10:43:47 +0800 Subject: [PATCH] feat: remove async check Signed-off-by: MiaoWoo --- packages/api/src/event.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/api/src/event.ts b/packages/api/src/event.ts index c6b5656d..38b03fc7 100644 --- a/packages/api/src/event.ts +++ b/packages/api/src/event.ts @@ -98,11 +98,9 @@ export namespace event { if (eventCls.isAssignableFrom(event.getClass())) { let time = Date.now() exec(event); - if (event.isAsynchronous()) { - let cost = Date.now() - time; - if (cost > 20) { - console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`) - } + let cost = Date.now() - time; + if (cost > 20) { + console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`) } } } catch (ex) {