Versions in this module Expand all Collapse all v0 v0.2.0 Jan 18, 2023 v0.1.0 Jan 18, 2023 Changes in this version + func Now() time.Time + func ReleaseTimer(timer *Timer) + func StartTimer(minTimerInterval time.Duration, maxTimerNum int) + type Cron struct + func (c *Cron) Do() + func (c *Cron) IsRef() bool + func (c *Cron) Ref() + func (c *Cron) Reset() + func (c *Cron) UnRef() + type CronExpr struct + func NewCronExpr(expr string) (cronExpr *CronExpr, err error) + func (e *CronExpr) Next(t time.Time) time.Time + type Dispatcher struct + ChanTimer chan ITimer + func NewDispatcher(l int) *Dispatcher + func (dispatcher *Dispatcher) AfterFunc(d time.Duration, cb func(uint64, interface{}), cbEx func(*Timer), ...) *Timer + func (dispatcher *Dispatcher) CronFunc(cronExpr *CronExpr, cb func(uint64, interface{}), cbEx func(*Cron), ...) *Cron + func (dispatcher *Dispatcher) TickerFunc(d time.Duration, cb func(uint64, interface{}), cbEx func(*Ticker), ...) *Ticker + type ITimer interface + AppendChannel func(timer ITimer) + Cancel func() + Do func() + GetFireTime func() time.Time + GetId func() uint64 + GetName func() string + IsActive func() bool + IsOpen func() bool + Open func(bOpen bool) + SetupTimer func(now time.Time) error + func SetupTimer(timer ITimer) ITimer + type OnAddTimer func(timer ITimer) + type OnCloseTimer func(timer ITimer) + type Ticker struct + func (c *Ticker) Do() + func (c *Ticker) IsRef() bool + func (c *Ticker) Ref() + func (c *Ticker) Reset() + func (c *Ticker) UnRef() + type Timer struct + AdditionData interface{} + C chan ITimer + Id uint64 + func NewTimer(d time.Duration) *Timer + func (t *Timer) AppendChannel(timer ITimer) + func (t *Timer) Cancel() + func (t *Timer) Do() + func (t *Timer) GetFireTime() time.Time + func (t *Timer) GetId() uint64 + func (t *Timer) GetInterval() time.Duration + func (t *Timer) GetName() string + func (t *Timer) IsActive() bool + func (t *Timer) IsOpen() bool + func (t *Timer) IsRef() bool + func (t *Timer) Open(bOpen bool) + func (t *Timer) Ref() + func (t *Timer) Reset() + func (t *Timer) SetupTimer(now time.Time) error + func (t *Timer) UnRef()