update code
This commit is contained in:
+3
-3
@@ -172,7 +172,7 @@ func matchPeriodPattern01(base time.Time, str string) (startimer.StarTimer, erro
|
||||
now = now.Add(time.Duration(sr.Value) * time.Second)
|
||||
}
|
||||
}
|
||||
return startimer.NewTimer(time.Now(), startimer.WithStaticDate(now), startimer.WithRunCountLimit(count)), nil
|
||||
return startimer.NewTimer(time.Now(), startimer.WithStaticDate(now), startimer.WithRunCountLimit(count))
|
||||
}
|
||||
if duration.Seconds() > 0 {
|
||||
rpt.Repeat = append(rpt.Repeat, startimer.Repeat{Unit: startimer.STAR_SECOND, Value: uint32(duration.Seconds())})
|
||||
@@ -180,7 +180,7 @@ func matchPeriodPattern01(base time.Time, str string) (startimer.StarTimer, erro
|
||||
if rpt.Every == setAsDate {
|
||||
rpt.Every = false
|
||||
}
|
||||
return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count)), nil
|
||||
return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count))
|
||||
}
|
||||
return startimer.StarTimer{}, errors.New("no Match")
|
||||
}
|
||||
@@ -268,7 +268,7 @@ func matchPeroidPattern02(base time.Time, str string) (startimer.StarTimer, erro
|
||||
if pts[1] != "" {
|
||||
count = 0
|
||||
}
|
||||
return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count)), nil
|
||||
return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count))
|
||||
}
|
||||
return startimer.StarTimer{}, errors.New("no Match")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user