| 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 | { |
no test coverage detected