Fix namespaces, add manual SetRunTime() method
Signed-off-by: Samuel Denis-D'Ortun <sam@sddproductions.com>pull/277/head
parent
e60bd7fb7d
commit
abfc38178a
|
@ -54,7 +54,7 @@ class LogController extends AbstractServerController {
|
||||||
// get users
|
// get users
|
||||||
$users = $this->db->select(PSM_DB_PREFIX.'users', null, array('user_id','name'));
|
$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();
|
$users_labels = array();
|
||||||
|
|
|
@ -99,7 +99,7 @@ class ServerController extends AbstractServerController {
|
||||||
$servers = $this->getServers();
|
$servers = $this->getServers();
|
||||||
$server_count = count($servers);
|
$server_count = count($servers);
|
||||||
|
|
||||||
$statusUpdater = new StatusUpdater($this->db);
|
$statusUpdater = new \psm\Util\Updater\StatusUpdater($this->db);
|
||||||
|
|
||||||
for ($x = 0; $x < $server_count; $x++) {
|
for ($x = 0; $x < $server_count; $x++) {
|
||||||
// template magic: push the actions html to the front of the server array
|
// template magic: push the actions html to the front of the server array
|
||||||
|
|
|
@ -19,13 +19,17 @@ abstract class AbstractUpdater
|
||||||
|
|
||||||
protected function StartRun(){
|
protected function StartRun(){
|
||||||
$this->run_start = microtime(true);
|
$this->run_start = microtime(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function StopRun(){
|
protected function StopRun(){
|
||||||
$this->run_time = (microtime(true) - $this->run_start);
|
$this->run_time = (microtime(true) - $this->run_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function SetRunTime($time_microsec){
|
||||||
|
$this->run_time = $time_microsec;
|
||||||
|
}
|
||||||
|
|
||||||
public function GetRunTime(){
|
public function GetRunTime(){
|
||||||
return $this->run_time;
|
return $this->run_time;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue