master
兔子 2 years ago
parent b0fd8947f0
commit 5eb59878cb

@ -1,7 +1,19 @@
package startimer package startimer
import "testing" import (
"fmt"
"testing"
"time"
)
func TestParseCron(t *testing.T) { 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)
}
} }

Loading…
Cancel
Save