From 0cfb2163463c8757bd618c3ca58c350520829ede Mon Sep 17 00:00:00 2001 From: boyce Date: Mon, 25 Jan 2021 14:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A8=A1=E5=9D=97=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/module.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/module.go b/service/module.go index 77940a0..cce979f 100644 --- a/service/module.go +++ b/service/module.go @@ -29,6 +29,12 @@ type IModule interface { NotifyEvent(ev *event.Event) } +type IModuleTimer interface { + AfterFunc(d time.Duration, cb func(*timer.Timer)) *timer.Timer + CronFunc(cronExpr *timer.CronExpr, cb func(*timer.Cron)) *timer.Cron + NewTicker(d time.Duration, cb func(*timer.Ticker)) *timer.Ticker +} + //1.管理各模块树层关系 //2.提供定时器常用工具 type Module struct {