Calculate time difference easier.

This commit is contained in:
Michal Schott
2020-05-05 14:10:23 +02:00
parent 1257d97ead
commit 615e3d4840
+1 -1
View File
@@ -134,7 +134,7 @@ func (dsl *DaemonSetLock) Release() error {
}
func ttlExpired(created time.Time, ttl time.Duration) bool {
if ttl > 0 && time.Now().UTC().Sub(created) >= ttl {
if ttl > 0 && time.Since(created) >= ttl {
return true
}
return false