README ¶ cycle-timer a timer cycle queue to resolve application whitch need too much timer use go get github.com/subing/cycletimer example import ( timer "github.com/subing/cycletimer" ) c := timer.NewTicker() _, ok := <-c if !ok { fmt.Println("close c") return } Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package cycletimer 批量定时器 Index ¶ func Close(tc CycleTicker) func Start(interval int) func Stop() type CycleTicker func NewTicker() CycleTicker Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Close ¶ func Close(tc CycleTicker) func Start ¶ func Start(interval int) Start 启动定时器 func Stop ¶ func Stop() Stop 结束定时器 Types ¶ type CycleTicker ¶ type CycleTicker struct { Index int C chan string } func NewTicker ¶ func NewTicker() CycleTicker NewTicker 创建定时器 Source Files ¶ View all Source files cycle_timer.go Click to show internal directories. Click to hide internal directories.