aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-11-23 23:20:48 +1300
committerDavid Phillips <david@sighup.nz>2017-11-23 23:20:53 +1300
commit6765aabd66c8c396402d2572015a4172bc103d51 (patch)
tree1234d49705d6262ee77c0ddac3fe3ec0c3e4f4e0
parente01ec4355d93eadda671859c33a7c0af2f6ec1ce (diff)
downloadsand-leek-6765aabd66c8c396402d2572015a4172bc103d51.tar.xz
Add years to estimate units
-rw-r--r--sand-leek.c5
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",