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/adb_io.cpp b/adb/adb_io.cpp
index ae16834..fe2ece5 100644
--- a/adb/adb_io.cpp
+++ b/adb/adb_io.cpp
@@ -20,6 +20,9 @@
#include <unistd.h>
+#include <chrono>
+#include <thread>
+
#include <android-base/stringprintf.h>
#include "adb.h"
@@ -104,7 +107,7 @@
if (r == -1) {
D("writex: fd=%d error %d: %s", fd, errno, strerror(errno));
if (errno == EAGAIN) {
- adb_sleep_ms(1); // just yield some cpu time
+ std::this_thread::yield();
continue;
} else if (errno == EPIPE) {
D("writex: fd=%d disconnected", fd);