summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configmgr/source/components.cxx4
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx7
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx11
3 files changed, 11 insertions, 11 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 7fdb43a3497b..39783056aa2e 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -21,6 +21,7 @@
#include <algorithm>
#include <cassert>
+#include <chrono>
#include <cstddef>
#include <list>
#include <set>
@@ -178,8 +179,7 @@ Components::WriteThread::WriteThread(
}
void Components::WriteThread::execute() {
- TimeValue t = { 1, 0 }; // 1 sec
- delay_.wait(&t); // must not throw; result_error is harmless and ignored
+ delay_.wait(std::chrono::seconds(1)); // must not throw; result_error is harmless and ignored
osl::MutexGuard g(*lock_); // must not throw
try {
try {
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 025139dcec77..a4c355be5bb2 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -32,6 +32,7 @@
#include <sfx2/lokhelper.hxx>
#include <svx/svdpage.hxx>
+#include <chrono>
#include <tabvwsh.hxx>
#include <docsh.hxx>
#include <document.hxx>
@@ -352,15 +353,13 @@ void ScTiledRenderingTest::testDocumentSize()
// Set cursor column
pViewShell->SetCursor(100, 0);
// 2 seconds
- TimeValue aTime = { 2 , 0 };
- osl::Condition::Result aResult = m_aDocSizeCondition.wait(aTime);
+ osl::Condition::Result aResult = m_aDocSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Set cursor row
pViewShell->SetCursor(0, 100);
// 2 seconds
- aTime = { 2 , 0 };
- aResult = m_aDocSizeCondition.wait(aTime);
+ aResult = m_aDocSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
comphelper::LibreOfficeKit::setActive(false);
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index cbb8703b30be..2013bfe949c8 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -45,6 +45,8 @@
#include <sfx2/request.hxx>
#include <svx/svxids.hrc>
+#include <chrono>
+
using namespace css;
static const char* const DATA_DIRECTORY = "/sd/qa/unit/tiledrendering/data/";
@@ -668,8 +670,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:InsertPage", aArgs);
- TimeValue aTimeValue = { 2 , 0 }; // 2 seconds max
- osl::Condition::Result aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ osl::Condition::Result aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify inserted slides
@@ -686,7 +687,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:DeletePage", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify deleted slides
@@ -702,7 +703,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:Undo", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify inserted slides
@@ -718,7 +719,7 @@ void SdTiledRenderingTest::testInsertDeletePage()
for (unsigned it = 1; it <= 10; it++)
comphelper::dispatchCommand(".uno:Redo", aArgs);
- aResult = m_aDocumentSizeCondition.wait(aTimeValue);
+ aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2));
CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
// Verify deleted slides