diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-14 17:17:15 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-07-14 17:24:45 +0200 |
commit | 1c8c85e3866b1a6b35baafd3482ff7ef494a0f24 (patch) | |
tree | b4c9022a5d7f1dc4f5852d2c8626ce3d3e65b941 /vcl/source | |
parent | bdbebda1d80f538f946b14042a366029f90d4820 (diff) |
Fix instant 0ms scheduler wakeup for headless
This is a regression from commit
503eba23c9a199583eddee9e169a4fddbecf416f
Due to rounding errors, as the Scheduler uses milliseconds, but
the headless backend uses nanoseconds the StartTimer assumed it
would wake up this ms, but the headless check function would still
wait. This is more of a workaround, so instant wakeup for the
headless backend works again.
Change-Id: I2ba9b4ad2b67ec99eeb4dd098ded6457d3753127
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/scheduler.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index a1634f73e2f3..dd2fd35b8664 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -145,7 +145,8 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce, sal_uInt64 nTime) ? SAL_MAX_UINT64 : rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod; // Only if smaller timeout, to avoid skipping. - if (bForce || nProposedTimeout < nCurTimeout) + // Force instant wakeup on 0ms, if the previous period was not 0ms + if (bForce || nProposedTimeout < nCurTimeout || (!nMS && rSchedCtx.mnTimerPeriod)) { SAL_INFO( "vcl.schedule", " Starting scheduler system timer (" << nMS << "ms)" ); rSchedCtx.mnTimerStart = nTime; |