Explicitly refer to the std::chrono namespace to avoid conflicts with the folly:...
[folly.git] / folly / io / async / test / EventHandlerTest.cpp
index c40fb71d9cedb6dedd1c8b16ddd07f8629a6614d..9e4bc7f1b3448200ab4da08914eddaafe426c3e5 100644 (file)
@@ -47,7 +47,7 @@ void runInThreadsAndWait(vector<function<void()>> cbs) {
 }
 
 class EventHandlerMock : public EventHandler {
-public:
+ public:
   EventHandlerMock(EventBase* eb, int fd) : EventHandler(eb, fd) {}
   // gmock can't mock noexcept methods, so we need an intermediary
   MOCK_METHOD1(_handlerReady, void(uint16_t));
@@ -57,7 +57,7 @@ public:
 };
 
 class EventHandlerTest : public Test {
-public:
+ public:
   int efd = 0;
 
   void SetUp() override {
@@ -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;