3#include <xrpl/beast/clock/abstract_clock.h>
4#include <xrpl/beast/clock/basic_seconds_clock.h>
5#include <xrpl/beast/clock/manual_clock.h>
34 date::sys_days{date::year{2000} / 1 / 1} - date::sys_days{date::year{1970} / 1 / 1};
51template <
class Duration>
55 return date::format(
"%Y-%b-%d %T %Z", tp);
66template <
class Duration>
71 return date::format(
"%FT%TZ", tp);
97 using Facade = Clock::Clock;
Abstract interface to a clock.
A clock whose minimum resolution is one second.
Manual clock implementation.
std::chrono::time_point< NetClock > time_point
static bool const is_steady
std::chrono::duration< rep, period > duration
AbstractClock< Facade > & getAbstractClock()
Returns a global instance of an abstract clock.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static constexpr std::chrono::seconds kEpochOffset
Clock for measuring the network time.
beast::AbstractClock< std::chrono::steady_clock > Stopwatch
A clock for measuring elapsed time.
Stopwatch & stopwatch()
Returns an instance of a wall clock.
std::string to_string(BaseUInt< Bits, Tag > const &a)
std::string toStringIso(date::sys_time< Duration > tp)
std::chrono::duration< int, std::ratio_multiply< days::period, std::ratio< 7 > > > weeks
std::chrono::duration< int, std::ratio_multiply< std::chrono::hours::period, std::ratio< 24 > > > days
beast::ManualClock< std::chrono::steady_clock > TestStopwatch
A manual Stopwatch for unit tests.
T time_since_epoch(T... args)