Avoid duplicate call to steady_clock::now
Summary: Currently we call `steady_clock::now` twice within just few instructions (one in `setScheduled` and one in `calcNextTick`) which adds unnecessary overhead. This diff makes us call it only once and use it for both computation of the deadline and tick number. This allows to achieve almost ~2x improvement in perf. Reviewed By: jmswen, vitaut Differential Revision: D13624360 fbshipit-source-id: 40bc3b3ad5123d22a5edcabd60d91c0f7efcbda7
Showing
Please register or sign in to comment