diff options
-rw-r--r-- | cppu/source/threadpool/threadpool.cxx | 4 | ||||
-rw-r--r-- | smoketest/smoketest.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx index 9861d9739abe..457ff94a73ad 100644 --- a/cppu/source/threadpool/threadpool.cxx +++ b/cppu/source/threadpool/threadpool.cxx @@ -20,6 +20,7 @@ #include "sal/config.h" #include <cassert> +#include <chrono> #include <algorithm> #include <unordered_map> @@ -148,8 +149,7 @@ namespace cppu_threadpool } // let the thread wait 2 seconds - TimeValue time = { 2 , 0 }; - waitingThread.condition.wait( &time ); + waitingThread.condition.wait( std::chrono::seconds(2) ); { MutexGuard guard ( m_mutexWaitingThreadList ); diff --git a/smoketest/smoketest.cxx b/smoketest/smoketest.cxx index c4c2178066e1..6bc2a9c531e6 100644 --- a/smoketest/smoketest.cxx +++ b/smoketest/smoketest.cxx @@ -18,6 +18,7 @@ */ #include <sal/types.h> +#include <chrono> #include "boost/noncopyable.hpp" #include "com/sun/star/awt/AsyncCallback.hpp" #include "com/sun/star/awt/XCallback.hpp" @@ -177,8 +178,7 @@ void Test::test() { css::uno::Any()); // Wait for result.condition or connection_ going stale: for (;;) { - TimeValue delay = { 1, 0 }; // 1 sec - osl::Condition::Result res = result.condition.wait(&delay); + osl::Condition::Result res = result.condition.wait(std::chrono::seconds(1)); // 1 sec delay if (res == osl::Condition::result_ok) { break; } |