mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-19 23:56:16 +00:00
* Moved Delegator over to using the new Block classes.
* Fixed alignment of the ratio display. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@710 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -89,7 +89,7 @@ print_ddhhmm(char* first, char* last, time_t t) {
|
|||||||
if (t / (24 * 3600) < 100)
|
if (t / (24 * 3600) < 100)
|
||||||
return print_buffer(first, last, "%2id %2i:%02i", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60);
|
return print_buffer(first, last, "%2id %2i:%02i", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60);
|
||||||
else
|
else
|
||||||
return print_buffer(first, last, "--:--:--");
|
return print_buffer(first, last, "--d --:--");
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
@@ -196,7 +196,7 @@ print_download_time_left(char* first, char* last, core::Download* d) {
|
|||||||
uint32_t rate = d->download()->down_rate()->rate();
|
uint32_t rate = d->download()->down_rate()->rate();
|
||||||
|
|
||||||
if (rate < 512)
|
if (rate < 512)
|
||||||
return print_buffer(first, last, "--:--:--");
|
return print_buffer(first, last, "--d --:--");
|
||||||
|
|
||||||
time_t remaining = (d->download()->bytes_total() - d->download()->bytes_done()) / (rate & ~(uint32_t)(512 - 1));
|
time_t remaining = (d->download()->bytes_total() - d->download()->bytes_done()) / (rate & ~(uint32_t)(512 - 1));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user