+void handle_sigtstp(int signal)
+{
+ if (signal == SIGTSTP) {
+ tfc_useconds freeze_start, freeze_end;
+
+ tfc_getcurtime(&freeze_start);
+ kill(getpid(), SIGSTOP);
+ tfc_getcurtime(&freeze_end);
+ total_time -= (freeze_end - freeze_start);
+ }
+}
+
- double seconds, human_totalproc_src, human_totalproc_dst, human_wr_speed;
- int src_scale_idx, dst_scale_idx, wr_speed_scale;
+ double seconds, human_totalproc_src, human_totalproc_dst, human_totalwrit_dst, human_wr_speed;
+ int src_scale_idx, dst_scale_idx, wri_scale_idx, wr_speed_scale;
total_time += (current_time - delta_time);
seconds = TFC_UTODSECS(current_time - delta_time);
wr_speed = delta_processed / seconds;
tfc_describescale(total_processed_src, &human_totalproc_src, &src_scale_idx);
tfc_describescale(total_processed_dst, &human_totalproc_dst, &dst_scale_idx);
total_time += (current_time - delta_time);
seconds = TFC_UTODSECS(current_time - delta_time);
wr_speed = delta_processed / seconds;
tfc_describescale(total_processed_src, &human_totalproc_src, &src_scale_idx);
tfc_describescale(total_processed_dst, &human_totalproc_dst, &dst_scale_idx);
"avg. speed %llu (%.2f%s) B/s, time %.4fs.",
oper_mode,
total_processed_src, human_totalproc_src, tfc_getscale(src_scale_idx),
"avg. speed %llu (%.2f%s) B/s, time %.4fs.",
oper_mode,
total_processed_src, human_totalproc_src, tfc_getscale(src_scale_idx),
- wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale),
- TFC_UTODSECS(current_time - delta_time));
- if (was_sigint == NO) tfc_esay("\n");
+ wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale), seconds);
+ tfc_esay("\n");
wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale), tfc_format_time(total_time));
else tfc_nfsay(stderr, "%s%s: read: %llu (%.2f%s),"
" %s %s %llu (%.2f%s) bytes,"
wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale), tfc_format_time(total_time));
else tfc_nfsay(stderr, "%s%s: read: %llu (%.2f%s),"
" %s %s %llu (%.2f%s) bytes,"
" (%llu (%.2f%s) B/s), time %s",
inplace, progname,
total_processed_src, human_totalproc_src, tfc_getscale(src_scale_idx),
tfc_modename(ctr_mode), oper_mode,
total_processed_dst, human_totalproc_dst, tfc_getscale(dst_scale_idx),
" (%llu (%.2f%s) B/s), time %s",
inplace, progname,
total_processed_src, human_totalproc_src, tfc_getscale(src_scale_idx),
tfc_modename(ctr_mode), oper_mode,
total_processed_dst, human_totalproc_dst, tfc_getscale(dst_scale_idx),
wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale), tfc_format_time(total_time));
}
wr_speed, human_wr_speed, tfc_getscale(wr_speed_scale), tfc_format_time(total_time));
}