diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-19 10:55:03 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-19 11:51:34 +0200 |
commit | fabf1cdb206e368a9433abf99a5ea2762a5ed2c0 (patch) | |
tree | 96b3cc124c82a3329859c3953251c0f86aba3f62 /src/policy/fees.cpp | |
parent | faed342a2338d6a1a26cf977671a736662debae4 (diff) | |
download | bitcoin-fabf1cdb206e368a9433abf99a5ea2762a5ed2c0.tar.xz |
Use steady clock for bench logging
Diffstat (limited to 'src/policy/fees.cpp')
-rw-r--r-- | src/policy/fees.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 2b940be07e..22defb91a9 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -997,8 +997,9 @@ bool CBlockPolicyEstimator::Read(AutoFile& filein) return true; } -void CBlockPolicyEstimator::FlushUnconfirmed() { - int64_t startclear = GetTimeMicros(); +void CBlockPolicyEstimator::FlushUnconfirmed() +{ + const auto startclear{SteadyClock::now()}; LOCK(m_cs_fee_estimator); size_t num_entries = mapMemPoolTxs.size(); // Remove every entry in mapMemPoolTxs @@ -1006,8 +1007,8 @@ void CBlockPolicyEstimator::FlushUnconfirmed() { auto mi = mapMemPoolTxs.begin(); _removeTx(mi->first, false); // this calls erase() on mapMemPoolTxs } - int64_t endclear = GetTimeMicros(); - LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %gs\n", num_entries, (endclear - startclear)*0.000001); + const auto endclear{SteadyClock::now()}; + LogPrint(BCLog::ESTIMATEFEE, "Recorded %u unconfirmed txs from mempool in %gs\n", num_entries, Ticks<SecondsDouble>(endclear - startclear)); } FeeFilterRounder::FeeFilterRounder(const CFeeRate& minIncrementalFee) |