int repeat, skipargs = 0;
repeat = atoi(argv[0]);
- if (repeat) {
+ if (argc > 1 && repeat) {
skipargs = 1;
} else {
repeat = 1;
} else {
if (latency < min) min = latency;
if (latency > max) max = latency;
+ tot += latency;
avg = (double) tot/count;
}
printf("\x1b[0G\x1b[2Kmin: %lld, max: %lld, avg: %.2f (%lld samples)",