+ if (!force && !je->nr_running && !je->nr_pending)
+ return 0;
+
+ je->nr_threads = thread_number;
+ memcpy(je->run_str, run_str, thread_number * sizeof(char));
+ return 1;
+}
+
+void display_thread_status(struct jobs_eta *je)
+{
+ static struct timeval disp_eta_new_line;
+ static int eta_new_line_init, eta_new_line_pending;
+ static int linelen_last;
+ static int eta_good;
+ char output[REAL_MAX_JOBS + 512], *p = output;
+ char eta_str[128];
+ double perc = 0.0;
+
+ if (je->eta_sec != INT_MAX && je->elapsed_sec) {
+ perc = (double) je->elapsed_sec / (double) (je->elapsed_sec + je->eta_sec);
+ eta_to_str(eta_str, je->eta_sec);
+ }
+
+ if (eta_new_line_pending) {
+ eta_new_line_pending = 0;
+ p += sprintf(p, "\n");
+ }