agent/utils/ticker.go
func NewJitteredTicker(ctx context.Context, start, end time.Duration) <-chan time.Time {
	ticker := make(chan time.Time, 1)

	go func() {
		defer close(ticker)

		for {
			select {
			case <-ctx.Done():
				return
			default:
				time.Sleep(randomDuration(start, end))
				sendNow(ticker)
			}
		}
	}()

	return ticker
}
func NewJitteredTicker(ctx context.Context, start, end time.Duration) <-chan time.Time {
	ticker := make(chan time.Time, 1)

	go func() {
		defer close(ticker)

		for {
			select {
			case <-ctx.Done():
				return
			default:
				time.Sleep(randomDuration(start, end))
				sendNow(ticker)
			}
		}
	}()

	return ticker
}
// NewJitteredTicker works like a time.Ticker except with randomly distributed ticks
// between start and end duration.