mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-15 19:17:33 -07:00
Removed sys_getloadavg() (#1188)
This commit is contained in:
parent
8e5b0ff13e
commit
ff46ec48a4
8 changed files with 2 additions and 35 deletions
|
@ -334,18 +334,13 @@ function hide_bb_path(string $path): string
|
|||
return ltrim(str_replace(BB_PATH, '', $path), '/\\');
|
||||
}
|
||||
|
||||
function sys($param)
|
||||
function sys(string $param)
|
||||
{
|
||||
switch ($param) {
|
||||
case 'la':
|
||||
return function_exists('sys_getloadavg') ? implode(' ', sys_getloadavg()) : 0;
|
||||
break;
|
||||
case 'mem':
|
||||
return memory_get_usage();
|
||||
break;
|
||||
case 'mem_peak':
|
||||
return memory_get_peak_usage();
|
||||
break;
|
||||
default:
|
||||
trigger_error("invalid param: $param", E_USER_ERROR);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue