fix Unix to UnixNano

This commit is contained in:
Joonas Aunola 2022-10-23 23:40:21 +03:00
parent b57d42905c
commit b06427c9f6
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ func monitorLockRefresh(ctx context.Context, lock *restic.Lock, lockInfo *lockCo
debug.Log("terminate expiry monitoring")
return
case <-refreshed:
lastRefresh = time.Now().Unix()
lastRefresh = time.Now().UnixNano()
case <-timer.C:
if time.Now().UnixNano()-lastRefresh < refreshabilityTimeout.Nanoseconds() {
// restart timer