From 9ca94c674207adc35979c0c40dc8ccaa9363db89 Mon Sep 17 00:00:00 2001 From: nxshock Date: Thu, 4 Feb 2021 21:25:41 +0500 Subject: [PATCH] Add missed dependency from calculate ETA period --- gwp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gwp.go b/gwp.go index 32d7a01..ea06020 100644 --- a/gwp.go +++ b/gwp.go @@ -52,7 +52,7 @@ func New(threadCount int) *WorkerPool { case <-tickerUpdateText.C: workerPool.printProgress() case <-tickerCalculateEta.C: - workerPool.currentSpeed = float64(workerPool.processedCount-prevPos) * float64(time.Second) / float64(time.Now().Sub(prevTime)) + workerPool.currentSpeed = float64(workerPool.processedCount-prevPos) * float64(defaultCalculateEtaPeriod) / float64(time.Now().Sub(prevTime)) prevPos = workerPool.processedCount prevTime = time.Now() case err := <-workerPool.resultChan: