mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-23 18:44:20 +03:00
fixed "infinite" transfer speed display
This commit is contained in:
parent
f2d6931f1a
commit
59d642434a
@ -48,6 +48,9 @@ export abstract class FileTransfer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected increaseProgress (bytes: number): void {
|
protected increaseProgress (bytes: number): void {
|
||||||
|
if (!bytes) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.completedBytes += bytes
|
this.completedBytes += bytes
|
||||||
this.lastChunkSpeed = bytes * 1000 / (Date.now() - this.lastChunkStartTime)
|
this.lastChunkSpeed = bytes * 1000 / (Date.now() - this.lastChunkStartTime)
|
||||||
this.lastChunkStartTime = Date.now()
|
this.lastChunkStartTime = Date.now()
|
||||||
|
Loading…
Reference in New Issue
Block a user