Calculates the close time for a ledger, given a close time resolution.
template< class Clock, class Duration, class Rep, class Period> std::chrono::time_point< Clock, Duration > roundCloseTime( std::chrono::time_point< Clock, Duration > closeTime, std::chrono::duration< Rep, Period > closeResolution);
Name |
Description |
---|---|
|
The time to be rouned. |
|
The resolution |
closeTime rounded to the nearest multiple of closeResolution. Rounds up if closeTime is midway between multiples of closeResolution.
#include <ripple/consensus/LedgerTiming.h>