Sign in
go
/
website
/
07c93911183265c8ace2c082a91160be850f7304
/
.
/
_content
/
blog
/
playground
/
time.go
blob: fb1f31496e82ddeeac0e32e8d761df1e389c7430 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import (
"fmt"
"time"
)
func main() {
stop := time.After(3 * time.Second)
tick := time.NewTicker(1 * time.Second)
defer tick.Stop()
for {
select {
case <-tick.C:
fmt.Println(time.Now())
case <-stop:
return
}
}
}