Remove non portable sleep by std::this_thread::sleep_for

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-07-15 16:00:07 +02:00
parent fcfdb7e56f
commit c8cb925813

View File

@ -31,6 +31,7 @@
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include <string> #include <string>
#include <thread> // for std::this_thread
#include <vector> #include <vector>
#ifdef _WIN32 #ifdef _WIN32
@ -325,11 +326,7 @@ SVNetwork::SVNetwork(const char* hostname, int port) {
Close(); Close();
std::cout << "ScrollView: Waiting for server...\n"; std::cout << "ScrollView: Waiting for server...\n";
#ifdef _WIN32 std::this_thread::sleep_for(std::chrono::seconds(1));
Sleep(1000);
#else
sleep(1);
#endif
} }
} }
} }