Commit 552024d3 authored by Jianfeng Tang's avatar Jianfeng Tang Committed by Facebook GitHub Bot

Fix one compilation warning - implicit conversion

Summary: As titled. Convert float to int explicitly to get rid of compilation warning.

Reviewed By: therealgymmy

Differential Revision: D27364578

fbshipit-source-id: a5f53142be9ba64260e7028d29c89a857ed66770
parent 82e4fd9e
......@@ -259,7 +259,7 @@ class BasicDynamicTokenBucket {
auto res =
consumeWithBorrowNonBlocking(toConsume, rate, burstSize, nowInSeconds);
if (res.value_or(0) > 0) {
int64_t napUSec = res.value() * 1000000;
const auto napUSec = static_cast<int64_t>(res.value() * 1000000);
std::this_thread::sleep_for(std::chrono::microseconds(napUSec));
}
return res.has_value();
......
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