From 7afcc1702410557ba8dda2481455b54eac6091a7 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Tue, 16 Jul 2019 13:09:10 -0700 Subject: [PATCH] no usleep() on Windows --- controller/FileDB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/FileDB.cpp b/controller/FileDB.cpp index 917784bae..695733061 100644 --- a/controller/FileDB.cpp +++ b/controller/FileDB.cpp @@ -75,7 +75,7 @@ FileDB::FileDB(EmbeddedNetworkController *const nc,const Identity &myId,const ch _onlineUpdateThread = std::thread([this]() { unsigned int cnt = 0; while (this->_running) { - usleep(250); + std::this_thread::sleep_for(std::chrono::microseconds(100)); if ((++cnt % 20) == 0) { // 5 seconds std::lock_guard l(this->_online_l); if (!this->_running) return;