diff --git a/cron_test.go b/cron_test.go index f0fd0db..be46515 100644 --- a/cron_test.go +++ b/cron_test.go @@ -1,7 +1,19 @@ package startimer -import "testing" +import ( + "fmt" + "testing" + "time" +) func TestParseCron(t *testing.T) { - parseCron("0 */4 * * * *") + r, err := NewTimerWithSecCron("0 */4 * * * *") + if err != nil { + t.Fatal(err) + } + base := time.Now() + for i := 0; i < 20; i++ { + base = r.NextTimerAfterDate(base) + fmt.Println(base) + } }