File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1016,7 +1016,7 @@ class CNode
1016
1016
// Used for BIP35 mempool sending
1017
1017
bool fSendMempool GUARDED_BY (cs_tx_inventory){false };
1018
1018
// Last time a "MEMPOOL" request was serviced.
1019
- std::atomic<std::chrono::seconds> m_last_mempool_req{std::chrono::seconds{ 0 } };
1019
+ std::atomic<std::chrono::seconds> m_last_mempool_req{0s };
1020
1020
std::chrono::microseconds nNextInvSend{0 };
1021
1021
1022
1022
RecursiveMutex cs_feeFilter;
@@ -1049,7 +1049,7 @@ class CNode
1049
1049
// The pong reply we're expecting, or 0 if no pong expected.
1050
1050
std::atomic<uint64_t > nPingNonceSent{0 };
1051
1051
/* * When the last ping was sent, or 0 if no ping was ever sent */
1052
- std::atomic<std::chrono::microseconds> m_ping_start{std::chrono::microseconds{ 0 } };
1052
+ std::atomic<std::chrono::microseconds> m_ping_start{0us };
1053
1053
// Last measured round-trip time.
1054
1054
std::atomic<int64_t > nPingUsecTime{0 };
1055
1055
// Best measured round-trip time.
Original file line number Diff line number Diff line change @@ -4080,7 +4080,7 @@ bool PeerManager::SendMessages(CNode* pto)
4080
4080
// over since our last self-announcement, but there is only a small
4081
4081
// bandwidth cost that we can incur by doing this (which happens
4082
4082
// once a day on average).
4083
- if (pto->m_next_local_addr_send != std::chrono::microseconds::zero () ) {
4083
+ if (pto->m_next_local_addr_send != 0us ) {
4084
4084
pto->m_addr_known ->reset ();
4085
4085
}
4086
4086
AdvertiseLocal (pto);
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ void RandAddSeedPerfmon(CSHA512& hasher)
69
69
70
70
// This can take up to 2 seconds, so only do it every 10 minutes.
71
71
// Initialize last_perfmon to 0 seconds, we don't skip the first call.
72
- static std::atomic<std::chrono::seconds> last_perfmon{std::chrono::seconds{ 0 } };
72
+ static std::atomic<std::chrono::seconds> last_perfmon{0s };
73
73
auto last_time = last_perfmon.load ();
74
74
auto current_time = GetTime<std::chrono::seconds>();
75
75
if (current_time < last_time + std::chrono::minutes{10 }) return ;
Original file line number Diff line number Diff line change 6
6
#ifndef BITCOIN_UTIL_TIME_H
7
7
#define BITCOIN_UTIL_TIME_H
8
8
9
+ #include < chrono>
9
10
#include < stdint.h>
10
11
#include < string>
11
- #include < chrono>
12
+
13
+ using namespace std ::chrono_literals;
12
14
13
15
void UninterruptibleSleep (const std::chrono::microseconds& n);
14
16
You can’t perform that action at this time.
0 commit comments