Switch fastboot/init/libprocessgroup to std::this_thread::sleep_for.
Bug: http://b/32878766
Test: boots
Change-Id: Ie0ddfb7e60f2da5f6eefbb10c83a92e88c137ae3
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 4cd423a..7f4a0dd 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -43,7 +43,9 @@
#include <sys/types.h>
#include <unistd.h>
+#include <chrono>
#include <functional>
+#include <thread>
#include <utility>
#include <vector>
@@ -301,7 +303,7 @@
announce = false;
fprintf(stderr, "< waiting for %s >\n", serial ? serial : "any device");
}
- usleep(1000);
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}