diff options
author | kaustubhprabhu <devnull@localhost> | 2009-07-28 20:21:30 +0000 |
---|---|---|
committer | kaustubhprabhu <devnull@localhost> | 2009-07-28 20:21:30 +0000 |
commit | c5038eea0adc684296285e4c9434015060930ddb (patch) | |
tree | bca5cfc5eea2b0ebbbd92e48efcaba76df2fd90b /src/timer.c | |
parent | 5212846ff43dfd9a9ec9b270cb1a723f9a71ac83 (diff) | |
download | iperf3-c5038eea0adc684296285e4c9434015060930ddb.tar.gz |
disabled timer for -n option
Diffstat (limited to 'src/timer.c')
-rw-r--r-- | src/timer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timer.c b/src/timer.c index 7f3dd0b..88de7c0 100644 --- a/src/timer.c +++ b/src/timer.c @@ -31,6 +31,10 @@ timeval_diff(struct timeval *tv0, struct timeval *tv1) int timer_expired(struct timer *tp) { + // for timer with zero time + if (tp->end.tv_sec == tp->begin.tv_sec && tp->end.tv_usec == tp->begin.tv_usec) + return 0; + struct timeval now; int64_t end = 0, current= 0, diff= 0; if(gettimeofday(&now, NULL) < 0) { |