OnceEvery is an object that will perform exactly one action every given interval.
| 8 | // OnceEvery is an object that will perform exactly one action every given |
| 9 | // interval. |
| 10 | type OnceEvery struct { |
| 11 | Interval time.Duration |
| 12 | mu sync.Mutex |
| 13 | last time.Time |
| 14 | } |
| 15 | |
| 16 | // NewOnceEvery creates a new OnceEvery struct |
| 17 | func New(d time.Duration) *OnceEvery { |
nothing calls this directly
no outgoing calls
no test coverage detected