WithTestClock is used in tests to inject a mock Clock
(clk quartz.Clock)
| 44 | |
| 45 | // WithTestClock is used in tests to inject a mock Clock |
| 46 | func WithTestClock(clk quartz.Clock) Option { |
| 47 | return func(n *Notifier) { |
| 48 | n.clock = clk |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // New returns a Notifier that calls cond once every time it polls. |
| 53 | // - Duplicate values are removed from countdown, and it is sorted in |