Switch adb over to <chrono>.
Clearer code, and lets us lose some more portability cruft.
Bug: http://b/32878766
Test: manual
Change-Id: Ie44928bbf8d68a74127aaf76e7e0060e25fa2cc8
diff --git a/adb/usb_windows.cpp b/adb/usb_windows.cpp
index 755f07e..1364537 100644
--- a/adb/usb_windows.cpp
+++ b/adb/usb_windows.cpp
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <mutex>
+#include <thread>
#include <adb_api.h>
@@ -176,9 +177,9 @@
adb_thread_setname("Device Poll");
D("Created device thread");
- while(1) {
+ while (true) {
find_devices();
- adb_sleep_ms(1000);
+ std::this_thread::sleep_for(std::chrono::seconds(1));
}
}