diff options
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c index a4b2bd0b38..c87665c25b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -61,7 +61,6 @@ long tv_udiff(struct timeval *start, struct timeval *end) { long udiff; - long end_usec = end->tv_usec; long secdiff = end->tv_sec - start->tv_sec; if (secdiff+1 > LONG_MAX/1000000) { @@ -69,9 +68,10 @@ tv_udiff(struct timeval *start, struct timeval *end) return LONG_MAX; } - udiff = secdiff*1000000L + (end_usec - start->tv_usec); + udiff = secdiff*1000000L + (end->tv_usec - start->tv_usec); if(udiff < 0) { - log_fn(LOG_WARNING, "start is after end. Returning 0."); + log_fn(LOG_INFO, "start (%ld.%ld) is after end (%ld.%ld). Returning 0.", + start->tv_sec, start->tv_usec, end->tv_sec, end->tv_usec); return 0; } return udiff; |