support getting timer from eventbase
authorScott Michelson <sdmich@fb.com>
Fri, 2 Dec 2016 19:48:48 +0000 (11:48 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 2 Dec 2016 19:53:43 +0000 (11:53 -0800)
Summary: This brings the EventBase functionality of getting a timer for the eventbase into the virtual interface

Differential Revision: D4264135

fbshipit-source-id: e5526610eca808e1d7b549a7cd6cd7b2c65d3ce1

folly/io/async/VirtualEventBase.h

index e18cffd4db2efcee3a7a3f98d927a29a61605166..ebe8118279e57e69b886cfaad52a35b40298bc8f 100644 (file)
@@ -84,6 +84,10 @@ class VirtualEventBase : public folly::Executor, public folly::TimeoutManager {
     ]() mutable { f(); }));
   }
 
+  HHWheelTimer& timer() {
+    return evb_.timer();
+  }
+
   void attachTimeoutManager(
       AsyncTimeout* obj,
       TimeoutManager::InternalEnum internal) override {