You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package startimer
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestParseCron(t *testing.T) {
|
|
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)
|
|
}
|
|
}
|