summaryrefslogtreecommitdiffstats
path: root/apps/s_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/s_time.c')
-rw-r--r--apps/s_time.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/s_time.c b/apps/s_time.c
index 34e939d047..1a58e19de5 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -394,10 +394,13 @@ int s_time_main(int argc, char **argv)
printf
("\n\n%d connections in %.2fs; %.2f connections/user sec, bytes read %ld\n",
nConn, totalTime, ((double)nConn / totalTime), bytes_read);
- printf
- ("%d connections in %ld real seconds, %ld bytes read per connection\n",
- nConn, (long)time(NULL) - finishtime + maxtime, bytes_read / nConn);
-
+ if (nConn > 0)
+ printf
+ ("%d connections in %ld real seconds, %ld bytes read per connection\n",
+ nConn, (long)time(NULL) - finishtime + maxtime, bytes_read / nConn);
+ else
+ printf("0 connections in %ld real seconds\n",
+ (long)time(NULL) - finishtime + maxtime);
ret = 0;
end: