20#ifndef RIPPLE_BASICS_CHRONO_H_INCLUDED
21#define RIPPLE_BASICS_CHRONO_H_INCLUDED
25#include <xrpl/beast/clock/abstract_clock.h>
26#include <xrpl/beast/clock/basic_seconds_clock.h>
27#include <xrpl/beast/clock/manual_clock.h>
44 duration<int, std::ratio_multiply<days::period, std::ratio<7>>>;
57 date::sys_days{date::year{2000} / 1 / 1} -
58 date::sys_days{date::year{1970} / 1 / 1};
75template <
class Duration>
79 return date::format(
"%Y-%b-%d %T %Z", tp);
91template <
class Duration>
96 return date::format(
"%FT%TZ", tp);
104 static_assert(std::is_same_v<NetClock::duration::period, std::ratio<1>>);
123 using Facade = Clock::Clock;
124 return beast::get_abstract_clock<Facade, Clock>();
A clock whose minimum resolution is one second.
static bool const is_steady
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Stopwatch & stopwatch()
Returns an instance of a wall clock.
static constexpr std::chrono::seconds epoch_offset
Clock for measuring the network time.
std::string to_string_iso(date::sys_time< Duration > tp)
std::string to_string(base_uint< Bits, Tag > const &a)
T time_since_epoch(T... args)