diff options
author | MacroFake <falke.marco@gmail.com> | 2022-06-28 17:50:53 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-07-30 10:23:58 +0200 |
commit | fa521c960337a65d4ce12cd1ef009c652ffe57e6 (patch) | |
tree | a877eded5b05bf4177128b0f701f7380ee1f4a55 /src/banman.cpp | |
parent | ab3db34836b157fe9a2196989a4d290c714bddc3 (diff) |
Use steady clock for all millis bench logging
Diffstat (limited to 'src/banman.cpp')
-rw-r--r-- | src/banman.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/banman.cpp b/src/banman.cpp index 508383d9f2..3cd646c148 100644 --- a/src/banman.cpp +++ b/src/banman.cpp @@ -31,12 +31,12 @@ void BanMan::LoadBanlist() if (m_client_interface) m_client_interface->InitMessage(_("Loading banlist…").translated); - int64_t n_start = GetTimeMillis(); + const auto start{SteadyClock::now()}; if (m_ban_db.Read(m_banned)) { SweepBanned(); // sweep out unused entries LogPrint(BCLog::NET, "Loaded %d banned node addresses/subnets %dms\n", m_banned.size(), - GetTimeMillis() - n_start); + Ticks<std::chrono::milliseconds>(SteadyClock::now() - start)); } else { LogPrintf("Recreating the banlist database\n"); m_banned = {}; @@ -58,13 +58,13 @@ void BanMan::DumpBanlist() SetBannedSetDirty(false); } - int64_t n_start = GetTimeMillis(); + const auto start{SteadyClock::now()}; if (!m_ban_db.Write(banmap)) { SetBannedSetDirty(true); } LogPrint(BCLog::NET, "Flushed %d banned node addresses/subnets to disk %dms\n", banmap.size(), - GetTimeMillis() - n_start); + Ticks<std::chrono::milliseconds>(SteadyClock::now() - start)); } void BanMan::ClearBanned() |