Initial commit

This commit is contained in:
Yuzuki616
2024-09-12 06:04:32 +09:00
commit 3f58fa7f0d
31 changed files with 2814 additions and 0 deletions

17
trigger/schedule.go Normal file
View File

@@ -0,0 +1,17 @@
package trigger
import "time"
type Schedule struct {
interval int
}
func newSchedule(interval int) *Schedule {
return &Schedule{
interval: interval,
}
}
func (s *Schedule) Next(t time.Time) time.Time {
return t.Add(time.Duration(s.interval) * time.Second)
}