コード例 #1
0
ファイル: Converter.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Prepare human-readable output for file size
  *
  * @param integer $size Size in bytes
  *
  * @return string
  */
 public static function formatFileSize($size)
 {
     list($size, $suffix) = \Includes\Utils\Converter::formatFileSize($size);
     return $size . ' ' . ($suffix ? static::t($suffix) : '');
 }
コード例 #2
0
ファイル: CacheManager.php プロジェクト: kingsj/core
 /**
  * showStepInfo
  *
  * @return void
  */
 public static function showStepInfo()
 {
     $text = number_format(microtime(true) - static::$stepStart, 2) . 'sec, ';
     $memory = memory_get_usage();
     $text .= \Includes\Utils\Converter::formatFileSize($memory, '');
     $text .= ' (' . \Includes\Utils\Converter::formatFileSize(memory_get_usage() - static::$stepMemory, '') . ')';
     \Includes\Utils\Operator::showMessage(' [' . $text . ']');
 }