Merge pull request #82266 from m3ngyang/time-since

replace time.Now().Sub with time.Since

Kubernetes-commit: 52626339b118901cc2f674b76b6920969241e389
This commit is contained in:
Kubernetes Publisher 2019-09-12 00:38:28 -07:00
commit 00e84af51c
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ func (h *kmsPluginProbe) Check() error {
h.l.Lock()
defer h.l.Unlock()
if (time.Now().Sub(h.lastResponse.received)) < kmsPluginHealthzTTL {
if (time.Since(h.lastResponse.received)) < kmsPluginHealthzTTL {
return h.lastResponse.err
}