}
}
+/*
+ * Allow a little slack - if we're within 95% of the time, allow ETA.
+ */
+bool eta_time_within_slack(unsigned int time)
+{
+ return time > ((eta_interval_msec * 95) / 100);
+}
+
/*
* Print status of the jobs we know about. This includes rate estimates,
* ETA, thread state, etc.
disp_time = mtime_since(&disp_prev_time, &now);
- /*
- * Allow a little slack, the target is to print it every 1000 msecs
- */
- if (!force && disp_time < 900)
+ if (!force && !eta_time_within_slack(disp_time))
return false;
calc_rate(unified_rw_rep, disp_time, io_bytes, disp_io_bytes, je->rate);
char *tr, *mr;
mr = num2str(je->m_rate[0] + je->m_rate[1] + je->m_rate[2],
- 4, 0, je->is_pow2, N2S_BYTEPERSEC);
+ je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
tr = num2str(je->t_rate[0] + je->t_rate[1] + je->t_rate[2],
- 4, 0, je->is_pow2, N2S_BYTEPERSEC);
+ je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
p += sprintf(p, ", %s-%s", mr, tr);
free(tr);