소스 검색

no usleep() on Windows

Grant Limberg 6 년 전
부모
커밋
7afcc17024
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      controller/FileDB.cpp

+ 1 - 1
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;