package mainimport ( "fmt" "time")func main() { // 设置定时时间 DurationOfTime:= time.Duration(3) * time.Second // 定义定时器 timer := time.AfterFunc(DurationOfTime,PrintLine) defer timer.Stop() go func() { i := 0 for { fmt.Println("
Go语言学习日记
2023-05-24
48 点赞
0 评论
72 浏览