diff options
author | David Phillips <david@sighup.nz> | 2017-11-23 23:20:48 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-11-23 23:20:53 +1300 |
commit | 6765aabd66c8c396402d2572015a4172bc103d51 (patch) | |
tree | 1234d49705d6262ee77c0ddac3fe3ec0c3e4f4e0 | |
parent | e01ec4355d93eadda671859c33a7c0af2f6ec1ce (diff) | |
download | sand-leek-6765aabd66c8c396402d2572015a4172bc103d51.tar.xz |
Add years to estimate units
-rw-r--r-- | sand-leek.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sand-leek.c b/sand-leek.c index 92ddfac..cdfcd3c 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -319,9 +319,12 @@ monitor_progress(unsigned long volatile *khashes, int thread_count) { } else if (remaining_abs < 60*60*24) { remaining = (remaining + 1800) / 3600; remaining_unit = "hour"; - } else { + } else if (remaining_abs < 60*60*24*365.25) { remaining = (remaining + 43200) / 86400; remaining_unit = "day"; + } else { + remaining = (remaining + (60*60*24*365.25)/2) / (60*60*24*365.25); + remaining_unit = "year"; } iprintf("[%02d:%02d:%02d:%02d]: %.2f %s hashes%s. Now ~%lu kH/s (%.2f kH/s/thread). Maybe %ld %s%s left \r", |