mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-02 03:16:11 -04:00
remove SOE deprecated code and files - leaving in the #if 0 blocks with TODO and other possible uses for later
This commit is contained in:
@@ -46,32 +46,8 @@ TaskManagerSysInfo & TaskManagerSysInfo::operator = (const TaskManagerSysInfo &
|
||||
|
||||
const float TaskManagerSysInfo::getScore() const
|
||||
{
|
||||
#if 0
|
||||
//Temporariy remove this since it's not giving us good results
|
||||
FILE * avg = popen("uptime", "r");
|
||||
float a = 0.0f;
|
||||
if(avg)
|
||||
{
|
||||
std::string output;
|
||||
while(!feof(avg))
|
||||
{
|
||||
char buf[1024] = {"\0"};
|
||||
|
||||
fread(buf, sizeof(buf), 1, avg);
|
||||
output += buf;
|
||||
}
|
||||
char formatted[1024] = {"\0"};
|
||||
std::string load = output.substr(output.find("load average:"));
|
||||
sscanf(load.c_str(), "load average: %f", &a);
|
||||
pclose(avg);
|
||||
}
|
||||
return a;
|
||||
#else
|
||||
|
||||
float ret = static_cast<float>(TaskManager::getNumGameConnections());
|
||||
return ret;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user