diff options
Diffstat (limited to 'adb/transport_local.cpp')
-rw-r--r-- | adb/transport_local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/transport_local.cpp b/adb/transport_local.cpp index 92010c0e0..c17f86914 100644 --- a/adb/transport_local.cpp +++ b/adb/transport_local.cpp @@ -25,7 +25,6 @@ #include <string.h> #include <sys/types.h> -#include <chrono> #include <condition_variable> #include <mutex> #include <thread> @@ -41,6 +40,7 @@ #include "adb.h" #include "adb_io.h" #include "adb_utils.h" +#include "sysdeps/chrono.h" #if ADB_HOST @@ -146,7 +146,7 @@ static void PollAllLocalPortsForEmulator() { // Retry the disconnected local port for 60 times, and sleep 1 second between two retries. constexpr uint32_t LOCAL_PORT_RETRY_COUNT = 60; -constexpr auto LOCAL_PORT_RETRY_INTERVAL = std::chrono::seconds(1); +constexpr auto LOCAL_PORT_RETRY_INTERVAL = 1s; struct RetryPort { int port; @@ -216,7 +216,7 @@ static void server_socket_thread(void* arg) { serverfd = network_inaddr_any_server(port, SOCK_STREAM, &error); if(serverfd < 0) { D("server: cannot bind socket yet: %s", error.c_str()); - std::this_thread::sleep_for(std::chrono::seconds(1)); + std::this_thread::sleep_for(1s); continue; } close_on_exec(serverfd); |