MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ExpiresSoon

Method ExpiresSoon

libi2pd/LeaseSet.cpp:206–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 bool LeaseSet::ExpiresSoon(const uint64_t dlt, const uint64_t fudge) const
207 {
208 auto now = i2p::util::GetMillisecondsSinceEpoch ();
209 if (fudge) now += rand() % fudge;
210 if (now >= m_ExpirationTime) return true;
211 return m_ExpirationTime - now <= dlt;
212 }
213
214 const std::vector<std::shared_ptr<const Lease> > LeaseSet::GetNonExpiredLeases (bool withThreshold) const
215 {

Callers 1

FindLeaseSetMethod · 0.80

Calls 1

Tested by

no test coverage detected