top(1): display uptime with seconds, print uptime in fixed format
1. It's sometimes useful to know the system uptime with more precision
than one minute.
So, this patch changes top(1) to print seconds of uptime in addition
to minutes, hours, and days.
2. It's *always* annoying when the information you want on a realtime
display is not shown in the same place in a consistent format.
So, this patch also changes top(1) to always print the uptime like
this:
up D days HH:MM:SS
This is much easier to read at a glance. In particular, it requires
no additional thought on my part to figure out whether the machine has
been up less than one day.
Maybe of note is that these changes make top(1)'s output different
from that of uptime(1). I don't think this matters very much. top(1)
is a realtime display, so it isn't likely to be parsed. uptime(1) is
a different story.
Link: https://marc.info/?l=openbsd-tech&m=160046282400892&w=2
Positive feedback from kn@.
ok gnezdo@ bluhm@ millert@