[Libreoffice-commits] online.git: loolwsd/Connect.cpp loolwsd/LOOLWSD.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Tue Sep 20 03:23:19 UTC 2016


 loolwsd/Connect.cpp |    4 +++-
 loolwsd/LOOLWSD.cpp |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 53ba8a130785778603db65d454e4f7ea158588f5
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Sep 17 09:48:39 2016 -0400

    loolwsd: use std sleep_for rather than POSIX or Poco
    
    Change-Id: Icce28f2ee61035534431bb8b5d7df93b00ad2fc3
    Reviewed-on: https://gerrit.libreoffice.org/29062
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/Connect.cpp b/loolwsd/Connect.cpp
index 5b10efa..eb91903 100644
--- a/loolwsd/Connect.cpp
+++ b/loolwsd/Connect.cpp
@@ -14,6 +14,7 @@
 #include <fstream>
 #include <iostream>
 #include <mutex>
+#include <thread>
 
 #include <Poco/Net/AcceptCertificateHandler.h>
 #include <Poco/Net/Context.h>
@@ -200,7 +201,8 @@ protected:
                     std::unique_lock<std::mutex> lock(coutMutex);
                     std::cout << "Sleeping " << sleepTime << " seconds" << std::endl;
                 }
-                Thread::sleep(sleepTime * 1000);
+
+                std::this_thread::sleep_for(std::chrono::seconds(sleepTime));
             }
             else if (line == "exit")
             {
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index b496a1b..9f1d6d7 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1923,7 +1923,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
                 }
             }
 
-            sleep(WSD_SLEEP_SECS);
+            std::this_thread::sleep_for(std::chrono::seconds(WSD_SLEEP_SECS));
 
             // Make sure we have sufficient reserves.
             prespawnChildren();


More information about the Libreoffice-commits mailing list