mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-08 02:19:33 +00:00
replace time.Now().Sub with time.Since
Kubernetes-commit: 5c9f4d9dc67b28fb31fd95f88448c09150a4cbfb
This commit is contained in:
committed by
Kubernetes Publisher
parent
6a49eed407
commit
861da69465
@@ -99,7 +99,7 @@ func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool {
|
||||
if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) {
|
||||
return false
|
||||
}
|
||||
return p.Clock.Now().Sub(eventTime) < entry.backoff
|
||||
return p.Clock.Since(eventTime) < entry.backoff
|
||||
}
|
||||
|
||||
// Returns True if time since lastupdate is less than the current backoff window.
|
||||
|
Reference in New Issue
Block a user