We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd2bd1 commit fa360b0Copy full SHA for fa360b0
src/randomenv.cpp
@@ -69,10 +69,10 @@ void RandAddSeedPerfmon(CSHA512& hasher)
69
70
// This can take up to 2 seconds, so only do it every 10 minutes.
71
// Initialize last_perfmon to 0 seconds, we don't skip the first call.
72
- static std::atomic<std::chrono::seconds> last_perfmon{0s};
+ static std::atomic<SteadyClock::time_point> last_perfmon{SteadyClock::time_point{0s}};
73
auto last_time = last_perfmon.load();
74
- auto current_time = GetTime<std::chrono::seconds>();
75
- if (current_time < last_time + std::chrono::minutes{10}) return;
+ auto current_time = SteadyClock::now();
+ if (current_time < last_time + 10min) return;
76
last_perfmon = current_time;
77
78
std::vector<unsigned char> vData(250000, 0);
0 commit comments