Remove legacy upTime() function

This commit is contained in:
Vinnie Falco
2013-05-25 15:49:12 -07:00
parent fb8c370d70
commit 4e8d4c28c2
12 changed files with 43 additions and 36 deletions

View File

@@ -134,7 +134,7 @@ bool LoadManager::shouldWarn(LoadSource& source) const
{
boost::mutex::scoped_lock sl(mLock);
int now = upTime();
int now = UptimeTimer::getInstance().getElapsedSeconds ();
canonicalize(source, now);
if (source.isPrivileged() || (source.mBalance > mDebitWarn) || (source.mLastWarning == now))
return false;
@@ -149,7 +149,7 @@ bool LoadManager::shouldCutoff(LoadSource& source) const
{
{
boost::mutex::scoped_lock sl(mLock);
int now = upTime();
int now = UptimeTimer::getInstance().getElapsedSeconds ();
canonicalize(source, now);
if (source.isPrivileged() || (source.mBalance > mDebitLimit))
return false;
@@ -171,7 +171,7 @@ bool LoadManager::adjust(LoadSource& source, int credits) const
{ // return: true = need to warn/cutoff
// We do it this way in case we want to add exponential decay later
int now = upTime();
int now = UptimeTimer::getInstance().getElapsedSeconds ();
canonicalize(source, now);
source.mBalance += credits;
if (source.mBalance > mCreditLimit)