mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 18:55:49 +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:
@@ -41,7 +41,7 @@
|
||||
#include <ripple/app/tx/apply.h>
|
||||
#include <ripple/basics/mulDiv.h>
|
||||
#include <ripple/basics/PerfLog.h>
|
||||
#include <ripple/basics/UptimeTimer.h>
|
||||
#include <ripple/basics/UptimeClock.h>
|
||||
#include <ripple/core/ConfigSections.h>
|
||||
#include <ripple/crypto/csprng.h>
|
||||
#include <ripple/crypto/RFC1751.h>
|
||||
@@ -2335,7 +2335,7 @@ Json::Value NetworkOPsImp::getServerInfo (bool human, bool admin, bool counters)
|
||||
}
|
||||
|
||||
info[jss::state_accounting] = accounting_.json();
|
||||
info[jss::uptime] = UptimeTimer::getInstance ().getElapsedSeconds ();
|
||||
info[jss::uptime] = UptimeClock::now().time_since_epoch().count();
|
||||
info[jss::jq_trans_overflow] = std::to_string(
|
||||
app_.overlay().getJqTransOverflow());
|
||||
info[jss::peer_disconnects] = std::to_string(
|
||||
|
||||
Reference in New Issue
Block a user