From b06427c9f6dd85eb70d85badac218781189dc8cd Mon Sep 17 00:00:00 2001 From: Joonas Aunola Date: Sun, 23 Oct 2022 23:40:21 +0300 Subject: [PATCH] fix Unix to UnixNano --- cmd/restic/lock.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/lock.go b/cmd/restic/lock.go index cbca0acf6..e15d63b8d 100644 --- a/cmd/restic/lock.go +++ b/cmd/restic/lock.go @@ -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