From: Ben Gras Date: Thu, 16 Mar 2006 01:44:06 +0000 (+0000) Subject: Tick calculation tweak X-Git-Tag: v3.1.2a~218 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/ddns-confgen.html?a=commitdiff_plain;h=5f9de8467436f0d932f568cb29b0698be2722d1e;p=minix.git Tick calculation tweak --- diff --git a/commands/simple/top.c b/commands/simple/top.c index ca4443374..c1bfe3ea3 100644 --- a/commands/simple/top.c +++ b/commands/simple/top.c @@ -114,8 +114,13 @@ void print_procs(int maxlines, if(proc2[p].p_rts_flags & SLOT_FREE) continue; tick_procs[nprocs].p = proc2 + p; - tick_procs[nprocs].ticks = - proc2[p].p_user_time-proc1[p].p_user_time; + if(proc1[p].p_endpoint == proc2[p].p_endpoint) { + tick_procs[nprocs].ticks = + proc2[p].p_user_time-proc1[p].p_user_time; + } else { + tick_procs[nprocs].ticks = + proc2[p].p_user_time; + } if(p-NR_TASKS == IDLE) { idleticks = tick_procs[nprocs].ticks; continue;