nextBoundary returns the first multiple of interval (relative to epoch) that is strictly after t.
(t time.Time, interval time.Duration)
| 209 | // nextBoundary returns the first multiple of interval (relative to |
| 210 | // epoch) that is strictly after t. |
| 211 | func nextBoundary(t time.Time, interval time.Duration) time.Time { |
| 212 | since := t.Sub(epoch) |
| 213 | n := since / interval |
| 214 | return epoch.Add((n + 1) * interval) |
| 215 | } |