summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/Timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/Timer.cpp')
-rw-r--r--cpp/src/qpid/sys/Timer.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/cpp/src/qpid/sys/Timer.cpp b/cpp/src/qpid/sys/Timer.cpp
index 973c6bd8b7..f8eef2c9ec 100644
--- a/cpp/src/qpid/sys/Timer.cpp
+++ b/cpp/src/qpid/sys/Timer.cpp
@@ -96,18 +96,13 @@ void TimerTask::cancel() {
state = CANCELLED;
}
-void TimerTask::setFired() {
- // Set nextFireTime to just before now, making readyToFire() true.
- nextFireTime = AbsTime(sys::now(), Duration(-1));
-}
-
-
+// TODO AStitcher 21/08/09 The threshholds for emitting warnings are a little arbitrary
Timer::Timer() :
active(false),
late(50 * TIME_MSEC),
overran(2 * TIME_MSEC),
lateCancel(500 * TIME_MSEC),
- warn(5 * TIME_SEC)
+ warn(60 * TIME_SEC)
{
start();
}
@@ -133,7 +128,6 @@ public:
}
};
-// TODO AStitcher 21/08/09 The threshholds for emitting warnings are a little arbitrary
void Timer::run()
{
Monitor::ScopedLock l(monitor);
@@ -151,10 +145,6 @@ void Timer::run()
{
TimerTaskCallbackScope s(*t);
if (s) {
- {
- Monitor::ScopedUnlock u(monitor);
- drop(t);
- }
if (delay > lateCancel) {
QPID_LOG(debug, t->name << " cancelled timer woken up " <<
delay / TIME_MSEC << "ms late");
@@ -171,8 +161,8 @@ void Timer::run()
if (!tasks.empty()) {
overrun = Duration(tasks.top()->nextFireTime, end);
}
- bool warningsEnabled;
- QPID_LOG_TEST(warning, warningsEnabled);
+ bool warningsEnabled; // TimerWarning enabled
+ QPID_LOG_TEST(debug, warningsEnabled); // TimerWarning emitted at debug level
if (warningsEnabled) {
if (overrun > overran) {
if (delay > overran) // if delay is significant to an overrun.
@@ -235,9 +225,6 @@ void Timer::fire(boost::intrusive_ptr<TimerTask> t) {
}
}
-// Provided for subclasses: called when a task is droped.
-void Timer::drop(boost::intrusive_ptr<TimerTask>) {}
-
bool operator<(const intrusive_ptr<TimerTask>& a,
const intrusive_ptr<TimerTask>& b)
{