标签:golang rtt tar new something 定时 for eth 简单
ticker.go
package main
import (
"time"
"fmt"
)
func main() {
StartTimer()
}
func StartTimer() {
t := time.NewTicker(time.Second * 1)
for {
<-t.C;
//Do something
fmt.Println(time.Now())
}
}
标签:golang rtt tar new something 定时 for eth 简单
原文地址:http://www.cnblogs.com/xiaohao073/p/6879021.html