diff options
author | 2007-03-23 06:56:40 +0000 | |
---|---|---|
committer | 2007-03-23 06:56:40 +0000 | |
commit | f7ff0c41ca8b45fba5bebc8dec5d18cd11e890a9 (patch) | |
tree | c712cf44265559392d29045916e205013971b4df | |
parent | Add more bloat to manual. (diff) | |
download | wireguard-openbsd-f7ff0c41ca8b45fba5bebc8dec5d18cd11e890a9.tar.xz wireguard-openbsd-f7ff0c41ca8b45fba5bebc8dec5d18cd11e890a9.zip |
display a timedelta of 0 in seconds, not some other unit.
requested by otto, ok otto
-rw-r--r-- | usr.bin/systat/sensors.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c index c0c86eb64bf..d4aa6872503 100644 --- a/usr.bin/systat/sensors.c +++ b/usr.bin/systat/sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.c,v 1.9 2007/03/23 01:10:38 ckuethe Exp $ */ +/* $OpenBSD: sensors.c,v 1.10 2007/03/23 06:56:40 ckuethe Exp $ */ /* * Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org> @@ -235,6 +235,8 @@ fmttime(double in) } else if (in >= 1 ){ unit = "sec"; /* in *= 1; */ /* no op */ + } else if (in == 0 ){ /* direct comparisons to floats are scary */ + unit = "sec"; } else if (in >= 1e-3 ){ unit = "mS"; in *= 1e3; |