PDA

View Full Version : Units Type supported?


pdwalker
09-12-2005, 15:53
What Unit Types are Supported in the UI?

from ./include/config.inc.php in convert_units() (if I've read it correctly)

s - seconds

b, bps - bits

<empty string> - (number or float depending on the input)

<any other value> - treated as a multiple of 1024

Alexei
09-12-2005, 21:40
I do not remember any special processing of any units apart of s.

pdwalker
10-12-2005, 02:35
You have a series of if statements controlling the conversions

if "s"
convert to time and return

if "b" or "bps"
convert using 1K units and return

if ""
treat it as a number and return

convert using 1024 units and return