freebsd-nq/usr.bin/w
Dag-Erling Smørgrav deb2f1b616 w: Fix premature rounding.
If the system has been up more longer than a minute, we add 30 seconds to
the uptime so that subsequent calculations will round to the nearest minute
rather than truncate.  However, since the introduction of libxo, we output
the raw value after performing the adjustment.  Rewrite so that we output
the raw value first, then perform the adjustment and recalculate before
outputting the humanized value.

While there, reduce stack usage and avoid needless allocations.

Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37128
2022-10-26 15:56:40 +00:00
..
extern.h
Makefile
Makefile.depend
pr_time.c w: cosmetic fixes. 2022-10-21 16:37:44 +00:00
proc_compare.c
uptime.1
w.1
w.c w: Fix premature rounding. 2022-10-26 15:56:40 +00:00