CurrantPi\StringHelpers::prettyMemory PHP Method

prettyMemory() public static method

* Take a number of bytes and return it either in terms of Gigs or Megs.
public static prettyMemory ( $total )
    public static function prettyMemory($total)
    {
        $total = intval($total);
        $ret = "unknown";
        if ($total > 999) {
            $total = round($total / 1024, 2);
            $ret = "{$total} GB";
        } else {
            $ret = "{$total} MB";
        }
        return $ret;
    }