Util: adder PerfTimer

This commit is contained in:
SChernykh
2023-03-30 19:09:15 +02:00
parent f6a285de87
commit 080fbaa26c
2 changed files with 23 additions and 0 deletions

View File

@@ -707,4 +707,11 @@ void remove_portmapping(int external_port)
}
#endif
NOINLINE PerfTimer::~PerfTimer()
{
using namespace std::chrono;
const duration<double, std::milli> dt = high_resolution_clock::now() - m_start;
LOGINFO(m_level, m_name << " took " << dt.count() << " ms");
}
} // namespace p2pool