Return to sensors.c CVS log | Up to [local] / src / usr.bin / systat |
version 1.10, 2007/03/23 06:56:40 | version 1.11, 2007/03/23 14:48:22 | ||
---|---|---|---|
|
|
||
unit = "min"; | unit = "min"; | ||
in /= SECS_PER_MIN; | in /= SECS_PER_MIN; | ||
} else if (in >= 1 ){ | } else if (in >= 1 ){ | ||
unit = "sec"; | unit = "s"; | ||
/* in *= 1; */ /* no op */ | /* in *= 1; */ /* no op */ | ||
} else if (in == 0 ){ /* direct comparisons to floats are scary */ | } else if (in == 0 ){ /* direct comparisons to floats are scary */ | ||
unit = "sec"; | unit = "s"; | ||
} else if (in >= 1e-3 ){ | } else if (in >= 1e-3 ){ | ||
unit = "mS"; | unit = "ms"; | ||
in *= 1e3; | in *= 1e3; | ||
} else if (in >= 1e-6 ){ | } else if (in >= 1e-6 ){ | ||
unit = "uS"; | unit = "us"; | ||
in *= 1e6; | in *= 1e6; | ||
} else if (in >= 1e-9 ){ | } else if (in >= 1e-9 ){ | ||
unit = "nS"; | unit = "ns"; | ||
in *= 1e9; | in *= 1e9; | ||
} else { | } else { | ||
unit = "pS"; | unit = "ps"; | ||
if (in < 1e-13) | if (in < 1e-13) | ||
tiny = 1; | tiny = 1; | ||
in *= 1e12; | in *= 1e12; |