runtime() public method

获取资源消耗
public runtime ( ) : array
return array
コード例 #1
0
ファイル: Controller.php プロジェクト: kissthink/php_qqMail
 /**
  * 显示运行时间和内存占用
  *
  * @return string
  */
 protected function showTime()
 {
     $runtime = $this->swoole->runtime();
     // 显示运行时间
     $showTime = '执行时间: ' . $runtime['time'];
     // 显示内存占用
     $showTime .= ' | 内存占用:' . $runtime['memory'];
     return $showTime;
 }