diff options
author | Josh Gao <jmgao@google.com> | 2016-11-15 18:55:47 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2016-11-16 12:14:59 -0800 |
commit | 4602adbcd3b15f0a575f3ade899f481ff0909f44 (patch) | |
tree | befe1cd8074c210ebee38ddbbc5a803cd3817ec1 /adb/socket_test.cpp | |
parent | 59826ddee5462d1be93176e2dee660c46e413e52 (diff) | |
download | system_core-4602adbcd3b15f0a575f3ade899f481ff0909f44.tar.gz system_core-4602adbcd3b15f0a575f3ade899f481ff0909f44.tar.bz2 system_core-4602adbcd3b15f0a575f3ade899f481ff0909f44.zip |
adb: add sysdeps/chrono.h for chrono literals on Win32.
Bug: http://b/32878766
Test: mma
Change-Id: Iaa89d4eadf07e63d6d7205057435a6c7fb5d4ec5
Diffstat (limited to 'adb/socket_test.cpp')
-rw-r--r-- | adb/socket_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adb/socket_test.cpp b/adb/socket_test.cpp index b6aff54e5..f56f7f790 100644 --- a/adb/socket_test.cpp +++ b/adb/socket_test.cpp @@ -19,7 +19,6 @@ #include <gtest/gtest.h> #include <array> -#include <chrono> #include <limits> #include <queue> #include <string> @@ -33,6 +32,7 @@ #include "fdevent_test.h" #include "socket.h" #include "sysdeps.h" +#include "sysdeps/chrono.h" struct ThreadArg { int first_read_fd; @@ -46,7 +46,7 @@ static void FdEventThreadFunc(void*) { fdevent_loop(); } -constexpr auto SLEEP_FOR_FDEVENT = std::chrono::milliseconds(100); +constexpr auto SLEEP_FOR_FDEVENT = 100ms; TEST_F(LocalSocketTest, smoke) { // Join two socketpairs with a chain of intermediate socketpairs. @@ -231,7 +231,7 @@ static void ClientThreadFunc() { std::string error; int fd = network_loopback_client(5038, SOCK_STREAM, &error); ASSERT_GE(fd, 0) << error; - std::this_thread::sleep_for(std::chrono::milliseconds(200)); + std::this_thread::sleep_for(200ms); ASSERT_EQ(0, adb_close(fd)); } |