--- basic/source/runtime/runtime.cxx	2006-09-26 18:06:14.000000000 +0100
+++ basic/source/runtime/runtime.cxx	2006-09-27 11:44:09.000000000 +0100
@@ -505,7 +505,7 @@ SbxArray* SbiInstance::GetLocals( SbMeth
 
 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;
@@ -660,8 +660,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 )
--- basic/source/inc/runtime.hxx	2006-09-26 18:06:14.000000000 +0100
+++ basic/source/inc/runtime.hxx	2006-09-27 10:24:19.000000000 +0100
@@ -363,9 +363,9 @@ class SbiRuntime
 	USHORT		  nFlags;			// Debugging-Flags
 	SbError		  nError;           // letzter Fehler
 	USHORT		  nOps;				// Opcode-Zaehler
-
+	sal_uInt32 m_nLastTime;
 	RefSaveItem*  pRefSaveList;     // #74254 Temporaere Referenzen sichern
 	RefSaveItem*  pItemStoreList;   // Unbenutzte Items aufbewahren	
 	void SaveRef( SbxVariable* pVar )
 	{
 		RefSaveItem* pItem = pItemStoreList;
