Fix namespaces, add manual SetRunTime() method

Signed-off-by: Samuel Denis-D'Ortun <sam@sddproductions.com>
This commit is contained in:
Samuel Denis-D'Ortun 2014-06-18 21:56:47 -04:00
parent e60bd7fb7d
commit abfc38178a
3 changed files with 7 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class LogController extends AbstractServerController {
// get users
$users = $this->db->select(PSM_DB_PREFIX.'users', null, array('user_id','name'));
$statusUpdater = new StatusUpdater($this->db);
$statusUpdater = new \psm\Util\Updater\StatusUpdater($this->db);
$users_labels = array();

View File

@ -99,7 +99,7 @@ class ServerController extends AbstractServerController {
$servers = $this->getServers();
$server_count = count($servers);
$statusUpdater = new StatusUpdater($this->db);
$statusUpdater = new \psm\Util\Updater\StatusUpdater($this->db);
for ($x = 0; $x < $server_count; $x++) {
// template magic: push the actions html to the front of the server array

View File

@ -19,13 +19,17 @@ abstract class AbstractUpdater
protected function StartRun(){
$this->run_start = microtime(true);
}
protected function StopRun(){
$this->run_time = (microtime(true) - $this->run_start);
}
protected function SetRunTime($time_microsec){
$this->run_time = $time_microsec;
}
public function GetRunTime(){
return $this->run_time;
}