summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-09-14 15:33:54 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-07-13 12:10:23 +0200
commit7a1c1699a61a77d0228417da9922812c9b893b9d (patch)
tree9ded7bd1fe28e211df290090a8b49690696fcc63 /vcl/qa
parent503eba23c9a199583eddee9e169a4fddbecf416f (diff)
Run Idle tasks immediatly
There is really no reason to wait a millisecond for an idle. Change-Id: I7665d5f2e7d6ba3e01290a692bbc8e42c36b9986
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/timer.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index dcd11319e293..eface298c865 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -19,6 +19,7 @@
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/scheduler.hxx>
#include "svdata.hxx"
#include "salinst.hxx"
@@ -125,7 +126,7 @@ void TimerTest::testIdle()
{
bool bTriggered = false;
IdleBool aTest( bTriggered );
- while ( Application::Reschedule() );
+ Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_MESSAGE("idle triggered", bTriggered);
}
@@ -438,7 +439,7 @@ void TimerTest::testInvokedReStart()
{
sal_Int32 nCount = 0;
IdleInvokedReStart aIdle( nCount );
- while ( Application::Reschedule() );
+ Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL( nCount, sal_Int32(2) );
}
@@ -473,7 +474,7 @@ void TimerTest::testPriority()
aLowPrioIdle.SetPriority( TaskPriority::LOWEST );
IdleSerializer aHighPrioIdle( "IdleSerializer HighPrio", 1, nProcessed );
aHighPrioIdle.SetPriority( TaskPriority::HIGHEST );
- while ( Application::Reschedule() );
+ Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Not all idles processed", sal_uInt32(2), nProcessed );
}
@@ -484,7 +485,7 @@ void TimerTest::testPriority()
aHighPrioIdle.SetPriority( TaskPriority::HIGHEST );
IdleSerializer aLowPrioIdle( "IdleSerializer LowPrio", 2, nProcessed );
aLowPrioIdle.SetPriority( TaskPriority::LOWEST );
- while ( Application::Reschedule() );
+ Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Not all idles processed", sal_uInt32(2), nProcessed );
}
}