summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/broker/RateTracker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/RateTracker.cpp b/cpp/src/qpid/broker/RateTracker.cpp
index f7bf0a8ff0..fc88d99cfa 100644
--- a/cpp/src/qpid/broker/RateTracker.cpp
+++ b/cpp/src/qpid/broker/RateTracker.cpp
@@ -43,7 +43,7 @@ double RateTracker::sampleRatePerSecond()
lastCount = currentCount;
lastTime = now;
//if sampling at higher frequency than supported, will just return the number of increments
- if (interval == 0) return increment;
+ if (interval < TIME_SEC) return increment;
else if (increment == 0) return 0;
else return increment / (interval / TIME_SEC);
}