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

@@ -5,9 +5,6 @@
#include <boost/thread/mutex.hpp>
extern int upTime();
enum LoadType
{ // types of load that can be placed on the server
@@ -66,12 +63,24 @@ protected:
bool mLogged;
public:
LoadSource(bool admin) :
mBalance(0), mFlags(admin ? lsfPrivileged : 0), mLastUpdate(upTime()), mLastWarning(0), mLogged(false)
{ ; }
LoadSource(const std::string& name) :
mName(name), mBalance(0), mFlags(0), mLastUpdate(upTime()), mLastWarning(0), mLogged(false)
{ ; }
LoadSource(bool admin)
: mBalance(0)
, mFlags(admin ? lsfPrivileged : 0)
, mLastUpdate(UptimeTimer::getInstance().getElapsedSeconds ())
, mLastWarning(0)
, mLogged(false)
{
}
LoadSource(const std::string& name)
: mName(name)
, mBalance(0)
, mFlags(0)
, mLastUpdate(UptimeTimer::getInstance().getElapsedSeconds ())
, mLastWarning(0)
, mLogged(false)
{
}
void rename(const std::string& name) { mName = name; }
const std::string& getName() { return mName; }