forked from TrueCloudLab/rclone
accounting: fix total ETA when --stats-unit bits is in effect
This commit is contained in:
parent
38864adc9c
commit
240c15883f
1 changed files with 3 additions and 2 deletions
|
@ -201,8 +201,9 @@ func (s *StatsInfo) String() string {
|
||||||
}
|
}
|
||||||
dtRounded := dt - (dt % (time.Second / 10))
|
dtRounded := dt - (dt % (time.Second / 10))
|
||||||
|
|
||||||
|
displaySpeed := speed
|
||||||
if fs.Config.DataRateUnit == "bits" {
|
if fs.Config.DataRateUnit == "bits" {
|
||||||
speed = speed * 8
|
displaySpeed *= 8
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -235,7 +236,7 @@ func (s *StatsInfo) String() string {
|
||||||
fs.SizeSuffix(s.bytes),
|
fs.SizeSuffix(s.bytes),
|
||||||
fs.SizeSuffix(totalSize).Unit("Bytes"),
|
fs.SizeSuffix(totalSize).Unit("Bytes"),
|
||||||
percent(s.bytes, totalSize),
|
percent(s.bytes, totalSize),
|
||||||
fs.SizeSuffix(speed).Unit(strings.Title(fs.Config.DataRateUnit)+"/s"),
|
fs.SizeSuffix(displaySpeed).Unit(strings.Title(fs.Config.DataRateUnit)+"/s"),
|
||||||
etaString(currentSize, totalSize, speed),
|
etaString(currentSize, totalSize, speed),
|
||||||
xfrchkString,
|
xfrchkString,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue