logging: make IntervalRateLimiter constexpr-constructible
Summary: This changes `IntervalRateLimiter` to allow it to be `constexpr`-constructible. We now always initialize the `timestamp_` field to 0. The very first call to `check()` will now always call `checkSlow()` which will then initialize `timestamp_` properly. This also removes the pure virtual `RateLimiter` interface class. At the moment `IntervalRateLimiter` is the only implementation, and all call sites use this class directly. We can always add the `RateLimiter` interface back in the future if we need it later. Reviewed By: yfeldblum Differential Revision: D8798167 fbshipit-source-id: 80885a16506a8daa67653bd0a92accae7a973289
Showing
Please register or sign in to comment