summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2019-07-16 13:09:10 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2019-07-16 13:09:10 -0700
commit7afcc1702410557ba8dda2481455b54eac6091a7 (patch)
tree820394be7e8c7fe011c6e668877dc1b3d1671ec2
parent2ab2f687253f27e6c8736f8fbb2767cac0d52890 (diff)
downloadinfinitytier-7afcc1702410557ba8dda2481455b54eac6091a7.tar.gz
infinitytier-7afcc1702410557ba8dda2481455b54eac6091a7.zip
no usleep() on Windows
-rw-r--r--controller/FileDB.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/FileDB.cpp b/controller/FileDB.cpp
index 917784ba..69573306 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<std::mutex> l(this->_online_l);
if (!this->_running) return;