summaryrefslogtreecommitdiff
path: root/vcl/source/app/scheduler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/scheduler.cxx')
-rw-r--r--vcl/source/app/scheduler.cxx26
1 files changed, 17 insertions, 9 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index a1f559daf08d..b5e64e243801 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -156,7 +156,19 @@ void Scheduler::CallbackTaskScheduling(bool ignore)
Scheduler::ProcessTaskScheduling( true );
}
-void Scheduler::ProcessTaskScheduling( bool bTimer )
+void Scheduler::ProcessTaskScheduling( bool bTimerOnly )
+{
+ ImplSchedulerData* pSchedulerData;
+
+ // tdf#91727 - NB. bTimerOnly is ultimately not used
+ if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimerOnly)))
+ {
+ pSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
+ pSchedulerData->Invoke();
+ }
+}
+
+sal_uInt64 Scheduler::CalculateMinimumTimeout()
{
// process all pending Tasks
// if bTimer True, only handle timer
@@ -166,13 +178,6 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
sal_uInt64 nTime = tools::Time::GetSystemTicks();
sal_uInt64 nMinPeriod = MaximumTimeoutMs;
- // tdf#91727 - NB. bTimer is ultimately not used
- if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimer)))
- {
- pSchedulerData->mnUpdateTime = nTime;
- pSchedulerData->Invoke();
- }
-
pSchedulerData = pSVData->mpFirstSchedulerData;
while ( pSchedulerData )
{
@@ -207,12 +212,15 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
{
if ( pSVData->mpSalTimer )
pSVData->mpSalTimer->Stop();
- pSVData->mnTimerPeriod = MaximumTimeoutMs;
+ nMinPeriod = MaximumTimeoutMs;
+ pSVData->mnTimerPeriod = nMinPeriod;
}
else
{
Scheduler::ImplStartTimer(nMinPeriod, true);
}
+
+ return nMinPeriod;
}
void Scheduler::Start()