diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-21 12:31:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-21 14:58:51 +0200 |
commit | 29489b33b435683021b72cb2bce27aba8cb7a430 (patch) | |
tree | 8e4e1c59d56d5ed0d0ca4d088419067041e4553a /salhelper | |
parent | a4244c0f05b95ded277a3a7ed217bf0451daa996 (diff) |
loplugin:flatten
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'salhelper')
-rw-r--r-- | salhelper/source/timer.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx index 999eaa80abbd..430cdfe9138c 100644 --- a/salhelper/source/timer.cxx +++ b/salhelper/source/timer.cxx @@ -299,33 +299,33 @@ void TimerManager::checkForTimeout() Timer* pTimer = m_pHead; - if (pTimer->isExpired()) - { - // remove expired timer - m_pHead = pTimer->m_pNext; + if (!pTimer->isExpired()) + return; - pTimer->acquire(); + // remove expired timer + m_pHead = pTimer->m_pNext; - aLock.unlock(); + pTimer->acquire(); - pTimer->onShot(); + aLock.unlock(); - // restart timer if specified - if (!pTimer->m_aRepeatDelta.isEmpty()) - { - TTimeValue Now; + pTimer->onShot(); - osl_getSystemTime(&Now); + // restart timer if specified + if (!pTimer->m_aRepeatDelta.isEmpty()) + { + TTimeValue Now; - Now.Seconds += pTimer->m_aRepeatDelta.Seconds; - Now.Nanosec += pTimer->m_aRepeatDelta.Nanosec; + osl_getSystemTime(&Now); - pTimer->m_aExpired = Now; + Now.Seconds += pTimer->m_aRepeatDelta.Seconds; + Now.Nanosec += pTimer->m_aRepeatDelta.Nanosec; - registerTimer(pTimer); - } - pTimer->release(); + pTimer->m_aExpired = Now; + + registerTimer(pTimer); } + pTimer->release(); } void TimerManager::run() |