PHP Class CurrantPi\StringHelpers

Datei anzeigen Open project: ColinWaddell/CurrantPi

Public Methods

Method Description
prettyBaud ( $baud ) * Figure out of the baud rate should be shown as MB/s, Kb/s or b/s.
prettyLoadAverage ( $load_average ) * Take in the load_average as returned by the uptime command and return it as a percentage with the appropriate formatting.
prettyMemory ( $total ) * Take a number of bytes and return it either in terms of Gigs or Megs.
secondsToTime ( $seconds ) * Convert a number of seconds into the Days-Hours-Minutes format.

Method Details

prettyBaud() public static method

* Figure out of the baud rate should be shown as MB/s, Kb/s or b/s.
public static prettyBaud ( $baud )

prettyLoadAverage() public static method

* Take in the load_average as returned by the uptime command and return it as a percentage with the appropriate formatting.
public static prettyLoadAverage ( $load_average )

prettyMemory() public static method

* Take a number of bytes and return it either in terms of Gigs or Megs.
public static prettyMemory ( $total )

secondsToTime() public static method

* Convert a number of seconds into the Days-Hours-Minutes format.
public static secondsToTime ( $seconds )