From 0f7c7a6904bb06d2fa0f8875ced4a1da96c263f9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 22 Apr 2006 20:28:07 +0200 Subject: [PATCH] [PATCH] splice-net: pretty up rate show --- splice-net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/splice-net.c b/splice-net.c index 7c764b7..fa81a88 100644 --- a/splice-net.c +++ b/splice-net.c @@ -49,10 +49,10 @@ void show_rate(int sig) { unsigned long msecs = mtime_since_now(&start_time); - if (!msecs) - msecs = 1; - - printf("Throughput: %LuMiB/sec (%Lu MiB in %lu msecs)\n", kb_sent / msecs, kb_sent, msecs); + if (msecs) + printf("Throughput: %LuMiB/sec (%Lu KiB in %lu msecs)\n", kb_sent / msecs, kb_sent, msecs); + else + printf("Transferred %Lu KiB\n", kb_sent); } int main(int argc, char *argv[]) -- 2.25.1