Commit c0980078 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Back out D14608368 to HHWheelTimerBase

Summary:
Back out D14608368 "HHWheelTimerBase: use different DEFAULT_TICK_INTERVAL values for milliseconds and microseconds".

The change being backed out breaks the MSVC build; backing it out should restore the MSVC build.

Fixes #1087.

Differential Revision: D14638652

fbshipit-source-id: b06b2934771adeff7a49c54b33da84a5bc973e66
parent 24e531f7
...@@ -40,15 +40,8 @@ namespace folly { ...@@ -40,15 +40,8 @@ namespace folly {
* start showing up in cpu perf. Also, it might not be possible to set * start showing up in cpu perf. Also, it might not be possible to set
* tick interval less than 10ms on older kernels. * tick interval less than 10ms on older kernels.
*/ */
template <> template <class Duration>
int HHWheelTimerBase<std::chrono::milliseconds>::DEFAULT_TICK_INTERVAL = 10; int HHWheelTimerBase<Duration>::DEFAULT_TICK_INTERVAL = 10;
/*
* An interval of 200usec will give us 200usec * WHEEL_SIZE^WHEEL_BUCKETS
* for the largest timeout possible, or about 9 days.
*/
template <>
int HHWheelTimerBase<std::chrono::microseconds>::DEFAULT_TICK_INTERVAL = 200;
template <class Duration> template <class Duration>
HHWheelTimerBase<Duration>::Callback::Callback() {} HHWheelTimerBase<Duration>::Callback::Callback() {}
......
...@@ -343,16 +343,11 @@ class HHWheelTimerBase : private folly::AsyncTimeout, ...@@ -343,16 +343,11 @@ class HHWheelTimerBase : private folly::AsyncTimeout,
} }
}; };
// std::chrono::milliseconds
template <>
int HHWheelTimerBase<std::chrono::milliseconds>::DEFAULT_TICK_INTERVAL;
using HHWheelTimer = HHWheelTimerBase<std::chrono::milliseconds>; using HHWheelTimer = HHWheelTimerBase<std::chrono::milliseconds>;
extern template class HHWheelTimerBase<std::chrono::milliseconds>; extern template class HHWheelTimerBase<std::chrono::milliseconds>;
// std::chrono::microseconds // std::chrono::microseconds
template <> template <>
int HHWheelTimerBase<std::chrono::microseconds>::DEFAULT_TICK_INTERVAL;
template <>
void HHWheelTimerBase<std::chrono::microseconds>::scheduleTimeoutInternal( void HHWheelTimerBase<std::chrono::microseconds>::scheduleTimeoutInternal(
std::chrono::microseconds timeout); std::chrono::microseconds timeout);
......
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