]> granicus.if.org Git - procps-ng/commit
top: added some elapsed running time 'ELAPSED' support
authorJim Warner <james.warner@comcast.net>
Sun, 27 Feb 2022 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Mon, 28 Feb 2022 09:21:00 +0000 (20:21 +1100)
commit9348d3b0085bd389749cc5619fdde4ec3fae5f11
treea9faf2e740f8c6f6d1854d94f454353b9ee4c5b7
parenta749414f16d0871d7e430460d396334b57784319
top: added some elapsed running time 'ELAPSED' support

When the 'STARTED' field was added, in the message for
the commit referenced below, I explained why 'ELAPSED'
shouldn't be implemented though it might be preferred.

Well, after climbing out of my box to do a little more
thinking, I came up with the way to add that 'ELAPSED'
field while avoiding the possible performance penalty.

Just do not show what would change with every refresh!

If we do not show the seconds portion of a scaled tics
amount then the problem goes away. And this comes with
an additional benefit. The HH,MM (hours,minutes) style
then is readily compared with that system uptime shown
as HH:MM. The only difference is just the comma/colon.

[ assuming the top uptime/load average toggle was on ]

Reference(s):
. introduced 'start time' field
commit 7647e96b0a35d473fa9bc644ea6107487b3b0527

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.1
top/top.c
top/top.h
top/top_nls.c