Versions in this module Expand all Collapse all v0 v0.0.3 Jul 17, 2020 Changes in this version + func ParserStartAt(startAt time.Time, dateFmt string) (*time.Time, error) type GrapeTimer + EndTime time.Time + StartTime time.Time v0.0.1 Jul 7, 2020 Changes in this version + const DateFormat + const Day + const DayRegexp + const LoopOnce + const Month + const MonthRegexp + const TimeFormat + const UnlimitLoop + const Week + const WeekRegexp + var CDebugMode bool = true + var DayCRegexp = regexp.Compile(DayRegexp) + var LocationFormat = "Asia/Shanghai" + var MonthCRegexp = regexp.Compile(MonthRegexp) + var RecoverPanic = func(err error) + var SkipWaitTask bool = true + var UseAsyncExec bool = true + var WeekCRegexp = regexp.Compile(WeekRegexp) + func AtTime(timeFmt string, loc *time.Location) (*time.Time, error) + func Format(Id int64, layout string) string + func InitGrapeScheduler(t time.Duration, ars bool) + func List() map[int64]string + func NewFromJson(json string, fn GrapeExecFn, args ...interface{}) int64 + func NewTickerLoop(tick, count int, fn GrapeExecFn, args ...interface{}) int64 + func NewTickerOnce(tick int, fn GrapeExecFn, args ...interface{}) int64 + func NewTimeDataLoop(data string, count int, fn GrapeExecFn, args ...interface{}) int64 + func NewTimeDataOnce(data string, fn GrapeExecFn, args ...interface{}) int64 + func PanicTrace(kb int) []byte + func Parser(dateFmt string) (*time.Time, error) + func ParserLoc(dateFmt string, loc *time.Location) (*time.Time, error) + func PeekNextId() int64 + func SaveAll() []string + func SetCreateGUID(fn func() int64) + func SetGuidSeed(seed int64) error + func StopTimer(Id int64) + func String(Id int64) string + func ToJson(Id int64) string + type GrapeExecFn interface + type GrapeScheduler struct + var GScheduler *GrapeScheduler = nil + func (c *GrapeScheduler) Format(id int64, layout string) string + func (c *GrapeScheduler) List() map[int64]string + func (c *GrapeScheduler) SaveAll() []string + func (c *GrapeScheduler) StopTimer(Id int64) + func (c *GrapeScheduler) String(id int64) string + func (c *GrapeScheduler) ToJson(id int64) string + type GrapeTimer struct + Id int64 + LoopCount int32 + NextTime int64 + RunMode int + TimeData string + func (c *GrapeTimer) Execute() + func (c *GrapeTimer) Format(layout string) string + func (c *GrapeTimer) IsDestroy() bool + func (c *GrapeTimer) IsExpired() bool + func (c *GrapeTimer) ParserJson(s string) *GrapeTimer + func (c *GrapeTimer) Stop() + func (c *GrapeTimer) String() string