(_ context.Context)
| 27 | } |
| 28 | |
| 29 | func (t *Ticker) Setup(_ context.Context) error { |
| 30 | // time.NewTicker panics on a non-positive interval; fail as an error instead. |
| 31 | if t.Interval <= 0 { |
| 32 | return fmt.Errorf("ticker %s: interval must be positive, got %s", t.ID(), t.Interval) |
| 33 | } |
| 34 | t.tk = time.NewTicker(t.Interval) |
| 35 | return nil |
| 36 | } |
| 37 | |
| 38 | func (t *Ticker) Wait(ctx context.Context) (engine.Event, error) { |
| 39 | select { |