/**ticker定时器周期执行*/package mainimport ("fmt""time")func main(){ticker:&#61;time.NewTicker(time.Second)i:&#61;0for{<-ticker.Ci&#43;&#43;if i&#61;&#61;6{//停止定时器ticker.Stop()break}fmt.Println(time.Now())}}