package mainimport ( "fmt" "time")func main() { // ticker inner use chanel ticker := time.NewTicker(time.Second) for { <-ticker.C fmt.Println("tick!") }}
本文共 211 字,大约阅读时间需要 1 分钟。
package mainimport ( "fmt" "time")func main() { // ticker inner use chanel ticker := time.NewTicker(time.Second) for { <-ticker.C fmt.Println("tick!") }}
转载于:https://www.cnblogs.com/LittleLee/p/9387828.html