aboutsummaryrefslogtreecommitdiff
path: root/internal/progress/refresh.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/progress/refresh.go')
-rw-r--r--internal/progress/refresh.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/internal/progress/refresh.go b/internal/progress/refresh.go
deleted file mode 100644
index ed1782db..00000000
--- a/internal/progress/refresh.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package progress
-
-import "time"
-
-func (meter *Meter) refreshThroughput(now time.Time) {
- if !meter.throughput {
- return
- }
-
- if meter.nextThroughput.After(now) && meter.throughputSuffix != "" {
- return
- }
-
- for !now.Before(meter.nextThroughput) {
- meter.nextThroughput = meter.nextThroughput.Add(throughputInterval)
- }
-
- elapsed := now.Sub(meter.startedAt)
- if elapsed <= 0 {
- return
- }
-
- rate := uint64(float64(meter.lastBytes) / elapsed.Seconds())
- meter.throughputSuffix = ", " + humanizeBytes(meter.lastBytes) + " | " + humanizeBytes(rate) + "/s"
-}