mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
新增模块定时器
This commit is contained in:
@@ -29,6 +29,12 @@ type IModule interface {
|
|||||||
NotifyEvent(ev *event.Event)
|
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.管理各模块树层关系
|
//1.管理各模块树层关系
|
||||||
//2.提供定时器常用工具
|
//2.提供定时器常用工具
|
||||||
type Module struct {
|
type Module struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user