summaryrefslogtreecommitdiff
path: root/basic/source/runtime/runtime.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-02 14:32:56 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-02 14:32:56 +0000
commite9fa5160e4096d46d7f7519aee2c98a36d370916 (patch)
tree39d77bde663dca1b89b6663cf66496b133d20ce3 /basic/source/runtime/runtime.cxx
parent2e0ec49e27f473ba720d87a2e3450aef80d007de (diff)
INTEGRATION: CWS ab30 (1.29.18); FILE MERGED
2006/10/17 14:55:25 ab 1.29.18.2: RESYNC: (1.29-1.30); FILE MERGED 2006/10/06 06:15:42 ab 1.29.18.1: #i69913# New Reschedule handling
Diffstat (limited to 'basic/source/runtime/runtime.cxx')
-rw-r--r--basic/source/runtime/runtime.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 8e60d7dec9c9..06f44a2a2457 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: runtime.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:16:41 $
+ * last change: $Author: vg $ $Date: 2006-11-02 15:32:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -502,7 +502,7 @@ SbxArray* SbiInstance::GetLocals( SbMethod* pMeth )
SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart )
: rBasic( *(StarBASIC*)pm->pParent ), pInst( pINST ),
- pMod( pm ), pMeth( pe ), pImg( pMod->pImage )
+ pMod( pm ), pMeth( pe ), pImg( pMod->pImage ), m_nLastTime(0)
{
nFlags = pe ? pe->GetDebugFlags() : 0;
pIosys = pInst->pIosys;
@@ -657,8 +657,15 @@ BOOL SbiRuntime::Step()
if( bRun )
{
// Unbedingt gelegentlich die Kontrolle abgeben!
- if( !( ++nOps & 0x1F ) && pInst->IsReschedule() && bStaticGlobalEnableReschedule )
- Application::Reschedule();
+ if( !( ++nOps & 0xF ) && pInst->IsReschedule() && bStaticGlobalEnableReschedule )
+ {
+ sal_uInt32 nTime = osl_getGlobalTimer();
+ if (nTime - m_nLastTime > 5 ) // 20 ms
+ {
+ Application::Reschedule();
+ m_nLastTime = nTime;
+ }
+ }
// #i48868 blocked by next call level?
while( bBlocked )