@@ -46,6 +46,7 @@ import (
46
46
"k8s.io/kubernetes/pkg/scheduler/internal/heap"
47
47
"k8s.io/kubernetes/pkg/scheduler/metrics"
48
48
"k8s.io/kubernetes/pkg/scheduler/util"
49
+ "k8s.io/utils/clock"
49
50
)
50
51
51
52
const (
@@ -136,7 +137,7 @@ type PriorityQueue struct {
136
137
framework.PodNominator
137
138
138
139
stop chan struct {}
139
- clock util .Clock
140
+ clock clock .Clock
140
141
141
142
// pod initial backoff duration.
142
143
podInitialBackoffDuration time.Duration
@@ -175,7 +176,7 @@ type PriorityQueue struct {
175
176
}
176
177
177
178
type priorityQueueOptions struct {
178
- clock util .Clock
179
+ clock clock .Clock
179
180
podInitialBackoffDuration time.Duration
180
181
podMaxBackoffDuration time.Duration
181
182
podMaxInUnschedulablePodsDuration time.Duration
@@ -186,8 +187,8 @@ type priorityQueueOptions struct {
186
187
// Option configures a PriorityQueue
187
188
type Option func (* priorityQueueOptions )
188
189
189
- // WithClock sets clock for PriorityQueue, the default clock is util .RealClock.
190
- func WithClock (clock util .Clock ) Option {
190
+ // WithClock sets clock for PriorityQueue, the default clock is clock .RealClock.
191
+ func WithClock (clock clock .Clock ) Option {
191
192
return func (o * priorityQueueOptions ) {
192
193
o .clock = clock
193
194
}
@@ -229,7 +230,7 @@ func WithPodMaxInUnschedulablePodsDuration(duration time.Duration) Option {
229
230
}
230
231
231
232
var defaultPriorityQueueOptions = priorityQueueOptions {
232
- clock : util .RealClock {},
233
+ clock : clock .RealClock {},
233
234
podInitialBackoffDuration : DefaultPodInitialBackoffDuration ,
234
235
podMaxBackoffDuration : DefaultPodMaxBackoffDuration ,
235
236
podMaxInUnschedulablePodsDuration : DefaultPodMaxInUnschedulablePodsDuration ,
0 commit comments