Commit 55cb92ef authored by Mikhail Shatalov's avatar Mikhail Shatalov Committed by Facebook Github Bot

Removed unnecessary cast

Summary: Floating-point scale conversion doesn't require a cast

Reviewed By: yfeldblum

Differential Revision: D18052505

fbshipit-source-id: 3d87a916da5cec03b23041908066a9862fab6fde
parent 9aea2092
...@@ -106,9 +106,8 @@ class BasicDynamicTokenBucket { ...@@ -106,9 +106,8 @@ class BasicDynamicTokenBucket {
* Returns the current time in seconds since Epoch. * Returns the current time in seconds since Epoch.
*/ */
static double defaultClockNow() noexcept { static double defaultClockNow() noexcept {
using dur = std::chrono::duration<double>;
auto const now = Clock::now().time_since_epoch(); auto const now = Clock::now().time_since_epoch();
return std::chrono::duration_cast<dur>(now).count(); return std::chrono::duration<double>(now).count();
} }
/** /**
......
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