diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-08-10 18:02:29 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-08-10 18:02:29 +0300 |
commit | 20acdef98f7d6838527f60a4c283499f67e1dc8f (patch) | |
tree | 8a0730baf920fc3bf0f13ef896811a31fe7f1417 /bin/cmd.js | |
parent | d254f65543bbab7d0840887ba9f8a222acbc201a (diff) |
cmd: use torrent.timeRemaining
Diffstat (limited to 'bin/cmd.js')
-rwxr-xr-x | bin/cmd.js | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -487,10 +487,8 @@ function drawTorrent (torrent) { }) var linesRemaining = clivas.height var peerslisted = 0 - var speed = torrent.swarm.downloadSpeed() - var estimatedSecondsRemaining = - Math.max(0, torrent.length - torrent.swarm.downloaded) / (speed > 0 ? speed : -1) - var estimate = moment.duration(estimatedSecondsRemaining, 'seconds').humanize() + var speed = torrent.downloadSpeed() + var estimate = moment.duration(torrent.timeRemaining / 1000, 'seconds').humanize() clivas.clear() |