Commit 77bea361 authored by James Sedgwick's avatar James Sedgwick Committed by facebook-github-bot-4

move ThreadWheelTimekeeper out of detail

Summary: This can be useful on its own, will use in twagent

Reviewed By: @fugalh

Differential Revision: D2457778
parent 4401039f
......@@ -148,13 +148,13 @@ nobase_follyinclude_HEADERS = \
futures/ScheduledExecutor.h \
futures/SharedPromise.h \
futures/SharedPromise-inl.h \
futures/ThreadWheelTimekeeper.h \
futures/Timekeeper.h \
futures/Try-inl.h \
futures/Try.h \
futures/Unit.h \
futures/detail/Core.h \
futures/detail/FSM.h \
futures/detail/ThreadWheelTimekeeper.h \
futures/detail/Types.h \
gen/Base.h \
gen/Base-inl.h \
......@@ -317,13 +317,13 @@ libfolly_la_SOURCES = \
File.cpp \
FileUtil.cpp \
FingerprintTables.cpp \
futures/detail/ThreadWheelTimekeeper.cpp \
futures/Barrier.cpp \
futures/ThreadedExecutor.cpp \
futures/Future.cpp \
futures/InlineExecutor.cpp \
futures/ManualExecutor.cpp \
futures/QueuedImmediateExecutor.cpp \
futures/ThreadWheelTimekeeper.cpp \
detail/Futex.cpp \
GroupVarint.cpp \
GroupVarintTables.cpp \
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include <folly/futures/Future.h>
#include <folly/futures/detail/ThreadWheelTimekeeper.h>
#include <folly/futures/ThreadWheelTimekeeper.h>
#include <folly/Likely.h>
namespace folly {
......
......@@ -19,7 +19,7 @@
#include <folly/futures/Future.h>
#include <future>
namespace folly { namespace detail {
namespace folly {
namespace {
Singleton<ThreadWheelTimekeeper> timekeeperSingleton_;
......@@ -90,8 +90,12 @@ Future<Unit> ThreadWheelTimekeeper::after(Duration dur) {
return f;
}
namespace detail {
Timekeeper* getTimekeeperSingleton() {
return timekeeperSingleton_.get();
}
}} // folly::detail
} // detail
} // folly
......@@ -22,7 +22,7 @@
#include <folly/io/async/HHWheelTimer.h>
#include <thread>
namespace folly { namespace detail {
namespace folly {
/// The default Timekeeper implementation which uses a HHWheelTimer on an
/// EventBase in a dedicated thread. Users needn't deal with this directly, it
......@@ -45,6 +45,4 @@ class ThreadWheelTimekeeper : public Timekeeper {
HHWheelTimer::UniquePtr wheelTimer_;
};
Timekeeper* getTimekeeperSingleton();
}} // folly::detail
} // folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment