mirror of
https://github.com/nxshock/gwp.git
synced 2025-07-01 00:13:39 +05:00
Add missed dependency from calculate ETA period
This commit is contained in:
parent
6bcb8d3356
commit
9ca94c6742
1 changed files with 1 additions and 1 deletions
2
gwp.go
2
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue