From 7ec701a81699b0d697e5fa6198e47271d6906dae Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 21 Apr 2015 18:33:04 -0400 Subject: [PATCH] uin32_t for elapsed time --- Profiling.cpp | 4 ++-- Profiling.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Profiling.cpp b/Profiling.cpp index 839406c2..70df0e76 100644 --- a/Profiling.cpp +++ b/Profiling.cpp @@ -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 diff --git a/Profiling.h b/Profiling.h index 93fb5be2..3a5a0844 100644 --- a/Profiling.h +++ b/Profiling.h @@ -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: