mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
uin32_t for elapsed time
This commit is contained in:
parent
c96b81206d
commit
7ec701a816
@ -128,7 +128,7 @@ namespace data
|
||||
UpdateTime ();
|
||||
}
|
||||
|
||||
bool RouterProfile::IsLowPartcipationRate (int elapsedTime) const
|
||||
bool RouterProfile::IsLowPartcipationRate (uint32_t elapsedTime) const
|
||||
{
|
||||
if (elapsedTime < 900) // if less than 15 minutes
|
||||
return m_NumTunnelsAgreed < m_NumTunnelsDeclined; // 50% rate
|
||||
@ -136,7 +136,7 @@ namespace data
|
||||
return 3*m_NumTunnelsAgreed < m_NumTunnelsDeclined; // 25% rate
|
||||
}
|
||||
|
||||
bool RouterProfile::IsLowReplyRate (int elapsedTime) const
|
||||
bool RouterProfile::IsLowReplyRate (uint32_t elapsedTime) const
|
||||
{
|
||||
auto total = m_NumTunnelsAgreed + m_NumTunnelsDeclined;
|
||||
if (elapsedTime < 300) // if less than 5 minutes
|
||||
|
@ -42,8 +42,8 @@ namespace data
|
||||
void UpdateTime ();
|
||||
|
||||
bool IsAlwaysDeclining () const { return !m_NumTunnelsAgreed && m_NumTunnelsDeclined >= 5; };
|
||||
bool IsLowPartcipationRate (int elapsedTime) const;
|
||||
bool IsLowReplyRate (int elapsedTime) const;
|
||||
bool IsLowPartcipationRate (uint32_t elapsedTime) const;
|
||||
bool IsLowReplyRate (uint32_t elapsedTime) const;
|
||||
|
||||
private:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user