mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
util: Allow use of C++14 chrono literals
This commit is contained in:
@@ -69,7 +69,7 @@ void RandAddSeedPerfmon(CSHA512& hasher)
|
||||
|
||||
// This can take up to 2 seconds, so only do it every 10 minutes.
|
||||
// Initialize last_perfmon to 0 seconds, we don't skip the first call.
|
||||
static std::atomic<std::chrono::seconds> last_perfmon{std::chrono::seconds{0}};
|
||||
static std::atomic<std::chrono::seconds> last_perfmon{0s};
|
||||
auto last_time = last_perfmon.load();
|
||||
auto current_time = GetTime<std::chrono::seconds>();
|
||||
if (current_time < last_time + std::chrono::minutes{10}) return;
|
||||
|
||||
Reference in New Issue
Block a user