kit/ForKit.cpp | 8 ++++---- test/UnitAdmin.cpp | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit b67b335b50e980f73f379b1537e32b563d453c64 Author: Pranam Lashkari <[email protected]> AuthorDate: Tue Nov 19 14:00:30 2019 +0530 Commit: Jan Holesovsky <[email protected]> CommitDate: Wed Apr 29 10:28:53 2020 +0200 killpoco: Removed Poco::Thread::sleep Replaced method with std::this_thread::sleep_for Change-Id: I26e37475d67816e4f1d68d222b1c067107c27b05 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/83200 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Jan Holesovsky <[email protected]> diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp index c3c672c68..b15a4bea2 100644 --- a/kit/ForKit.cpp +++ b/kit/ForKit.cpp @@ -24,10 +24,11 @@ #include <cstring> #include <iostream> #include <map> +#include <thread> +#include <chrono> #include <Poco/Path.h> #include <Poco/Process.h> -#include <Poco/Thread.h> #include <Common.hpp> #include "Kit.hpp" @@ -45,7 +46,6 @@ #include <security.h> using Poco::Process; -using Poco::Thread; #ifndef KIT_IN_PROCESS static bool NoCapsForKit = false; @@ -322,7 +322,7 @@ static int createLibreOfficeKit(const std::string& childRoot, std::cerr << "Kit: Sleeping " << delaySecs << " seconds to give you time to attach debugger to process " << Process::id() << std::endl; - Thread::sleep(delaySecs * 1000); + std::this_thread::sleep_for(std::chrono::seconds(delaySecs)); } } @@ -424,7 +424,7 @@ int main(int argc, char** argv) std::cerr << "Forkit: Sleeping " << delaySecs << " seconds to give you time to attach debugger to process " << Process::id() << std::endl; - Thread::sleep(delaySecs * 1000); + std::this_thread::sleep_for(std::chrono::seconds(delaySecs)); } } diff --git a/test/UnitAdmin.cpp b/test/UnitAdmin.cpp index 65a4fccd0..4cb030047 100644 --- a/test/UnitAdmin.cpp +++ b/test/UnitAdmin.cpp @@ -11,6 +11,8 @@ #include <condition_variable> #include <mutex> +#include <thread> +#include <chrono> #include <Poco/Net/HTTPBasicCredentials.h> #include <Poco/Net/HTTPCookie.h> @@ -200,7 +202,7 @@ private: // FIXME: we really should wait for the subscription to be // registered and have a reply to avoid a race here. - Poco::Thread::sleep(250); + std::this_thread::sleep_for(std::chrono::milliseconds(250)); std::string documentPath1, documentURL1; helpers::getDocumentPathAndURL("hello.odt", documentPath1, documentURL1, "unitAdmin-hello.odt "); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
