Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
func NewTimer ¶
func NewTimer(excutor taskexcutor.Excutor) *Timer
func (*Timer) AddOnceEvent ¶
func (t *Timer) AddOnceEvent(listener *taskexcutor.TaskService, name string, wait time.Duration) (e *TimerEvent)
添加定时事件,事件的回调函数默认第一个参数为 *TimerEvent
func (*Timer) AddTimerEvent ¶
func (t *Timer) AddTimerEvent(listener *taskexcutor.TaskService, name string, initTime, interval time.Duration, count int, absolute bool) (e *TimerEvent)
添加定时事件,事件的回调函数默认第一个参数为 *TimerEvent
type TimerEvent ¶
type TimerEvent struct { Name string //事件名称 // contains filtered or unexported fields }
func AddOnceEvent ¶
func AddOnceEvent(listener *taskexcutor.TaskService, name string, wait time.Duration) (e *TimerEvent)
添加定时事件,事件的回调函数默认第一个参数为 *TimerEvent
func AddTimerEvent ¶
func AddTimerEvent(listener *taskexcutor.TaskService, name string, initTime, interval time.Duration, count int, absolute bool) (e *TimerEvent)
添加定时事件,事件的回调函数默认第一个参数为 *TimerEvent
func (*TimerEvent) Close ¶
func (e *TimerEvent) Close()
func (*TimerEvent) Closed ¶
func (e *TimerEvent) Closed() bool
Click to show internal directories.
Click to hide internal directories.