diff options
author | Gurkaran <gurkran@gmail.com> | 2016-03-22 03:25:02 +0530 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-22 06:54:08 +0000 |
commit | 9e7447d39e356857ef5786b513e99cee79385247 (patch) | |
tree | 12ab8cf850a2af5053959def004db5c463237008 /sd | |
parent | 7f36f4ce9f9f3d430009ba472d275d038abecb16 (diff) |
tdf#84323: Make osl::Thread::wait more readable
It is to improve the readability of calls to osl::Thread::wait.
Change-Id: I025d89abf8e84ca73ba08f001be3f45b86c89957
Signed-off-by: Gurkaran <gurkran@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/23416
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 0d34f507dcaf..ab5b45e5b893 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -31,6 +31,7 @@ #include <controller/SlideSorterController.hxx> #include <controller/SlsClipboard.hxx> #include <controller/SlsPageSelector.hxx> +#include <chrono> using namespace ::com::sun::star; @@ -85,8 +86,7 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat) while (Scheduler::ProcessTaskScheduling(true)); if ((pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase())) != nullptr) break; - TimeValue aSleep(0, 100 * 1000000); // 100 msec - osl::Thread::wait(aSleep); + osl::Thread::wait(std::chrono::milliseconds(100)); } CPPUNIT_ASSERT(pSSVS); @@ -126,8 +126,7 @@ void SdMiscTest::testTdf96708() xSSController.GetClipboard().DoCopy(); // Now wait for timers to trigger creation of auto-layout - TimeValue aSleep(0, 100 * 1000000); // 100 msec - osl::Thread::wait(aSleep); + osl::Thread::wait(std::chrono::milliseconds(100)); Scheduler::ProcessTaskScheduling(true); xSSController.GetClipboard().DoPaste(); |