Posted on 2013-12-19 16:15
oathleo 阅读(5358)
评论(0) 编辑 收藏 所属分类:
Golang
package main
import (
"fmt"
"mag/common"
"time"
)
func main() {
c := make(chan bool, 10)
tt := common.GetTodayGivenTime("161300")
dd := common.SinceNow(tt)
time.AfterFunc(dd, func() { //非阻塞
//后续每24小时建立目录
ticker24h := time.NewTicker(5 * time.Second)
for {
select {
case <-ticker24h.C:
fmt.Println("print")
}
}
})
<-c
}