• Stepan Palamarchuk's avatar
    Avoid duplicate call to steady_clock::now · 24e19946
    Stepan Palamarchuk authored
    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
    24e19946
HHWheelTimer.h 9.81 KB