diff options
author | fanquake <fanquake@gmail.com> | 2020-10-24 19:13:42 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-12-13 11:41:33 +0800 |
commit | 0475c8ba4d10dce79092361bc4c23c11dadba39a (patch) | |
tree | 621d4ded7bbd1bd742fc93a0f914166765890d72 /src/net.h | |
parent | f805933e70d4320e62739f4cecfc08bdbad8afaa (diff) |
net: use std::chrono throughout maxOutbound logic
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -363,7 +363,7 @@ public: ServiceFlags GetLocalServices() const; uint64_t GetMaxOutboundTarget(); - uint64_t GetMaxOutboundTimeframe(); + std::chrono::seconds GetMaxOutboundTimeframe(); //! check if the outbound target is reached //! if param historicalBlockServingLimit is set true, the function will @@ -374,9 +374,9 @@ public: //! in case of no limit, it will always response 0 uint64_t GetOutboundTargetBytesLeft(); - //! response the time in second left in the current max outbound cycle - //! in case of no limit, it will always response 0 - uint64_t GetMaxOutboundTimeLeftInCycle(); + //! returns the time left in the current max outbound cycle + //! in case of no limit, it will always return 0 + std::chrono::seconds GetMaxOutboundTimeLeftInCycle(); uint64_t GetTotalBytesRecv(); uint64_t GetTotalBytesSent(); @@ -475,7 +475,7 @@ private: // outbound limit & stats uint64_t nMaxOutboundTotalBytesSentInCycle GUARDED_BY(cs_totalBytesSent) {0}; - uint64_t nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent) {0}; + std::chrono::seconds nMaxOutboundCycleStartTime GUARDED_BY(cs_totalBytesSent) {0}; uint64_t nMaxOutboundLimit GUARDED_BY(cs_totalBytesSent); // P2P timeout in seconds |