1#ifndef XRPL_CORE_TIMEKEEPER_H_INCLUDED 
    2#define XRPL_CORE_TIMEKEEPER_H_INCLUDED 
    4#include <xrpl/basics/chrono.h> 
    5#include <xrpl/beast/clock/abstract_clock.h> 
   19    adjust(std::chrono::system_clock::time_point when)
 
   21        return time_point(std::chrono::duration_cast<duration>(
 
 
   73        using namespace std::chrono_literals;
 
   77        if (by == 0s && offset == 0s)
 
   88                return offset + ((by + 3s) / 4);
 
   91                return offset + ((by - 3s) / 4);
 
   93            return (offset * 3) / 4;
 
 
 
Abstract interface to a clock.
 
typename Clock::time_point time_point
 
Manages various times used by the server.
 
std::atomic< std::chrono::seconds > closeOffset_
 
static constexpr time_point adjust(std::chrono::system_clock::time_point when)
 
time_point now() const override
Returns the current time, using the server's clock.
 
std::chrono::seconds closeOffset() const
 
virtual ~TimeKeeper()=default
 
std::chrono::seconds adjustCloseTime(std::chrono::seconds by)
Adjust the close time, based on the network's view of time.
 
time_point closeTime() const
Returns the predicted close time, in network time.
 
T compare_exchange_strong(T... args)
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
static constexpr std::chrono::seconds epoch_offset
Clock for measuring the network time.