Merge pull request #106915 from MikeSpreitzer/deprecate-interval-clock

Recommend SimpleIntervalClock instead of IntervalClock
This commit is contained in:
Kubernetes Prow Robot 2022-01-05 14:56:03 -08:00 committed by GitHub
commit 5c2aa344c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,12 @@ func NewFakeClock(t time.Time) *testclocks.FakeClock {
// IntervalClock implements Clock, but each invocation of Now steps
// the clock forward the specified duration.
//
// Deprecated: Use k8s.io/utils/clock/testing.IntervalClock instead.
// WARNING: most of the Clock methods just `panic`;
// only PassiveClock is honestly implemented.
// The alternative, SimpleIntervalClock, has only the
// PassiveClock methods.
//
// Deprecated: Use k8s.io/utils/clock/testing.SimpleIntervalClock instead.
type IntervalClock = testclocks.IntervalClock
// Timer allows for injecting fake or real timers into code that