mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Replace UptimeTimer with UptimeClock
* UptimeClock is a chrono-compatible seconds-precision clock. * Like UptimeTimer, its purpose is to make it possible for clients to query the uptime thousands of times per second without a significant performance hit. * UptimeClock decouples itself from LoadManager by managing its own once-per-second update loop. * Clients now traffic in chrono time_points and durations instead of int.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#include <ripple/app/misc/ValidatorList.h>
|
||||
#include <ripple/app/tx/apply.h>
|
||||
#include <ripple/basics/random.h>
|
||||
#include <ripple/basics/UptimeTimer.h>
|
||||
#include <ripple/basics/UptimeClock.h>
|
||||
#include <ripple/beast/core/LexicalCast.h>
|
||||
#include <ripple/beast/core/SemanticVersion.h>
|
||||
#include <ripple/nodestore/DatabaseShard.h>
|
||||
@@ -1864,7 +1864,7 @@ PeerImp::doFetchPack (const std::shared_ptr<protocol::TMGetObjectByHash>& packet
|
||||
memcpy (hash.begin (), packet->ledgerhash ().data (), 32);
|
||||
|
||||
std::weak_ptr<PeerImp> weak = shared_from_this();
|
||||
auto elapsed = UptimeTimer::getInstance().getElapsedSeconds();
|
||||
auto elapsed = UptimeClock::now();
|
||||
auto const pap = &app_;
|
||||
app_.getJobQueue ().addJob (
|
||||
jtPACK, "MakeFetchPack",
|
||||
|
||||
Reference in New Issue
Block a user