Commit e3eecdae authored by Josh Watzman's avatar Josh Watzman Committed by Praveen Kumar Ramakrishnan

Tweak explicit std::max instantiation

Summary: Per discussion on D2040509 this is better.

Test Plan: Still builds.

Reviewed By: yfeldblum@fb.com

Subscribers: folly-diffs@, yfeldblum, chalfant

FB internal diff: D2051099

Signature: t1:2051099:1430949575:cc167b57f2d6ff42a73dee4e65d22d04932bb279

Blame Revision: rFBCODE9bdb427be1ef80b612e4f364db7809c6351cfe1c
parent c9f8c1db
......@@ -98,7 +98,7 @@ inline void EventBaseLoopController::timedSchedule(std::function<void()> func,
auto delay_ms = std::chrono::duration_cast<
std::chrono::milliseconds>(time - Clock::now()).count() + 1;
// If clock is not monotonic
delay_ms = std::max<long long int>(delay_ms, 0L);
delay_ms = std::max<decltype(delay_ms)>(delay_ms, 0L);
eventBase_->tryRunAfterDelay(func, delay_ms);
}
......
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