fixup! fixup! fixup! Enhance test coverage.

This commit is contained in:
2025-09-18 10:44:52 +01:00
parent 78d9f555a3
commit fbe9b71ada
6 changed files with 28 additions and 18 deletions
+3 -1
View File
@@ -61,7 +61,9 @@ func (s *Sometimes) Do(f func()) {
(s.Every > 0 && s.count%s.Every == 0) ||
(s.Interval > 0 && time.Since(s.last) >= s.Interval) {
f()
s.last = time.Now()
if s.Interval > 0 {
s.last = time.Now()
}
}
s.count++
}