From 8ad522efb72738fad32493be76fef9c71e5d530f Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 18 Mar 2011 15:37:40 +0000 Subject: NO-JIRA: Fix qpidd late/overran warnings. Warnings for late-and-overrun tasks were not being correctly reported. Lateness for overrun tasks below the late threshold were not being reported. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1082954 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/Timer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/sys/Timer.cpp') diff --git a/cpp/src/qpid/sys/Timer.cpp b/cpp/src/qpid/sys/Timer.cpp index a97ccd1bd1..85e410860d 100644 --- a/cpp/src/qpid/sys/Timer.cpp +++ b/cpp/src/qpid/sys/Timer.cpp @@ -131,12 +131,14 @@ void Timer::run() bool warningsEnabled; QPID_LOG_TEST(warning, warningsEnabled); if (warningsEnabled) { - if (delay > late && overrun > overran) - warn.lateAndOverran(t->name, delay, overrun, Duration(start, end)); + if (overrun > overran) { + if (delay > overran) // if delay is significant to an overrun. + warn.lateAndOverran(t->name, delay, overrun, Duration(start, end)); + else + warn.overran(t->name, overrun, Duration(start, end)); + } else if (delay > late) warn.late(t->name, delay); - else if (overrun > overran) - warn.overran(t->name, overrun, Duration(start, end)); } continue; } else { -- cgit v1.2.1