From a15238a7a9a28b9eed1b0bae8a99a1607639935d Mon Sep 17 00:00:00 2001 From: Lou Knauer Date: Mon, 11 Oct 2021 11:06:42 +0200 Subject: [PATCH] Add multiplication by time.Second --- metric-store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metric-store.go b/metric-store.go index 9909f95..9236d4f 100644 --- a/metric-store.go +++ b/metric-store.go @@ -210,7 +210,7 @@ func main() { conf = loadConfiguration("config.json") memoryStore = NewMemoryStore(conf.Metrics) - restoreFrom := startupTime.Add(-time.Duration(conf.Checkpoints.Restore)) + restoreFrom := startupTime.Add(-time.Duration(conf.Checkpoints.Restore) * time.Second) files, err := memoryStore.FromCheckpoint(conf.Checkpoints.RootDir, restoreFrom.Unix()) if err != nil { log.Fatalf("Loading checkpoints failed: %s\n", err.Error())