diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-21 07:23:33 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-21 07:23:33 (GMT) |
commit | 45357546c29240b95300f392084a2fe901073d85 (patch) | |
tree | aca89043c1bd80a3a7515402ee0fbb55b9cbf6ee /src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp | |
parent | 2e645960930442e895f887f1ef5e226d14eabcc7 (diff) | |
parent | f11fc8f62558543dac1eca9d52a4801196c55221 (diff) | |
download | Qt-45357546c29240b95300f392084a2fe901073d85.zip Qt-45357546c29240b95300f392084a2fe901073d85.tar.gz Qt-45357546c29240b95300f392084a2fe901073d85.tar.bz2 |
Merge commit 'qt/master'
Conflicts:
configure.exe
examples/examples.pro
qmake/Makefile.unix
qmake/Makefile.win32
qmake/Makefile.win32-g++
qmake/Makefile.win32-g++-sh
qmake/qmake.pro
src/script/api/qscriptable.h
src/script/api/qscriptclasspropertyiterator.h
src/script/api/qscriptcontext.h
src/script/api/qscriptengineagent.cpp
src/script/api/qscriptstring.cpp
src/script/api/qscriptstring.h
src/script/api/qscriptvalueiterator.cpp
src/script/api/qscriptvalueiterator.h
src/script/qscriptclass.cpp
src/script/qscriptcontext.cpp
src/script/qscriptengine.cpp
src/script/qscriptengine_p.cpp
src/script/qscriptvalue.cpp
src/script/qscriptvalue_p.h
src/script/qscriptvalueimplfwd_p.h
src/script/script.pro
src/src.pro
tests/auto/auto.pro
tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
tools/configure/configureapp.cpp
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp index 30ba6e9..045a33a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp @@ -56,8 +56,8 @@ namespace JSC { // Number of ticks before the first timeout check is done. static const int ticksUntilFirstCheck = 1024; -// Number of milliseconds between each timeout check. -static const int intervalBetweenChecks = 1000; +// Default number of milliseconds between each timeout check. +static const int defaultIntervalBetweenChecks = 1000; // Returns the time the current thread has spent executing, in milliseconds. static inline unsigned getCPUTime() @@ -104,10 +104,15 @@ static inline unsigned getCPUTime() TimeoutChecker::TimeoutChecker() : m_timeoutInterval(0) , m_startCount(0) + , m_intervalBetweenChecks(defaultIntervalBetweenChecks) { reset(); } +TimeoutChecker::~TimeoutChecker() +{ +} + void TimeoutChecker::reset() { m_ticksUntilNextCheck = ticksUntilFirstCheck; @@ -135,7 +140,7 @@ bool TimeoutChecker::didTimeOut(ExecState* exec) // Adjust the tick threshold so we get the next checkTimeout call in the // interval specified in intervalBetweenChecks. - m_ticksUntilNextCheck = static_cast<unsigned>((static_cast<float>(intervalBetweenChecks) / timeDiff) * m_ticksUntilNextCheck); + m_ticksUntilNextCheck = static_cast<unsigned>((static_cast<float>(m_intervalBetweenChecks) / timeDiff) * m_ticksUntilNextCheck); // If the new threshold is 0 reset it to the default threshold. This can happen if the timeDiff is higher than the // preferred script check time interval. if (m_ticksUntilNextCheck == 0) |