From bf30528ec4ed53d4c6aef2da0410a04124bbc492 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 30 Nov 2013 22:14:47 +0100 Subject: DeadlockDetect is configurable now. This is needed when debugging Lua plugins. --- src/DeadlockDetect.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/DeadlockDetect.cpp') diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp index c774c9dce..e699e0c84 100644 --- a/src/DeadlockDetect.cpp +++ b/src/DeadlockDetect.cpp @@ -31,8 +31,10 @@ cDeadlockDetect::cDeadlockDetect(void) : -bool cDeadlockDetect::Start(void) +bool cDeadlockDetect::Start(int a_IntervalSec) { + m_IntervalSec = a_IntervalSec; + // Read the initial world data: class cFillIn : public cWorldListCallback @@ -115,7 +117,7 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age) if (itr->second.m_Age == a_Age) { itr->second.m_NumCyclesSame += 1; - if (itr->second.m_NumCyclesSame > NUM_CYCLES_LIMIT) + if (itr->second.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS) { DeadlockDetected(); return; -- cgit v1.2.3