From: Christopher Dykes Date: Wed, 13 Dec 2017 20:49:43 +0000 (-0800) Subject: Explicitly refer to the std::chrono namespace to avoid conflicts with the folly:... X-Git-Tag: v2017.12.18.00~21 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4cbf7a642550f823e34eee832ffd9052f148864d;p=folly.git Explicitly refer to the std::chrono namespace to avoid conflicts with the folly::chrono namespace Summary: This is a hard requirement due to an upcoming change in Folly. The codemod was only run on files that referenced the `std::chrono` namespace with an unqualified `chrono` and also used both the `std` and `folly` namespaces. ``` fbgr -sl "[^:]chrono::" | xargs grep -l "using namespace std;" | xargs grep -l "using namespace folly;" | xargs sed -r -i 's/([^:])chrono::([a-z])/\1std::chrono::\2/g' ``` Reviewed By: yfeldblum Differential Revision: D6547864 fbshipit-source-id: 4a8230d311edbaa173722a09b2773e8d053fae7e --- diff --git a/folly/io/async/test/EventHandlerTest.cpp b/folly/io/async/test/EventHandlerTest.cpp index feb2f774..9e4bc7f1 100644 --- a/folly/io/async/test/EventHandlerTest.cpp +++ b/folly/io/async/test/EventHandlerTest.cpp @@ -128,7 +128,8 @@ TEST_F(EventHandlerTest, many_concurrent_producers) { runInThreadsAndWait(nproducers, [&](size_t /* k */) { for (size_t i = 0; i < writes / nproducers; ++i) { - this_thread::sleep_for(chrono::milliseconds(1)); + this_thread::sleep_for( + std::chrono::milliseconds(1)); efd_write(1); } }); @@ -175,7 +176,8 @@ TEST_F(EventHandlerTest, many_concurrent_consumers) { runInThreadsAndWait(nproducers, [&](size_t /* k */) { for (size_t i = 0; i < writes / nproducers; ++i) { - this_thread::sleep_for(chrono::milliseconds(1)); + this_thread::sleep_for( + std::chrono::milliseconds(1)); queue.blockingWrite(nullptr); efd_write(1); --writesRemaining;