删除测试文件

pull/21/merge
ouqiang 2017-05-14 22:23:11 +08:00
parent 0148fd424b
commit c9eb4e31af
1 changed files with 0 additions and 37 deletions

37
test.go
View File

@ -1,37 +0,0 @@
package main
import (
"github.com/ouqiang/timewheel"
"time"
"fmt"
"github.com/ouqiang/gocron/models"
)
func main() {
// tick刻度为1秒, 3600个槽
tw := timewheel.New(1 * time.Second, 3600)
tw.Start()
t := time.Now()
tw.Add(5 * time.Second, func() {
fmt.Println("5分钟", time.Now(), t.Add(5 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(10 * time.Second, func() {
fmt.Println("10分钟", time.Now(), t.Add(10 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(35 * time.Second, func() {
fmt.Println("35分钟", time.Now(), t.Add(35 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(178 * time.Second, func() {
fmt.Println("178分钟", time.Now(), t.Add(178 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(27 * time.Second, func() {
fmt.Println("27分钟", time.Now(), t.Add(27 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(78 * time.Second, func() {
fmt.Println("78分钟", time.Now(), t.Add(78 * time.Second).Format(models.DefaultTimeFormat))
})
tw.Add(3 * time.Second, func() {
fmt.Println("3分钟", time.Now(), t.Add(3 * time.Second).Format(models.DefaultTimeFormat))
})
select {}
}