[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [patch] ksysguard process list bug
From:       Daniel Karlsson <chaotica () home ! se>
Date:       2001-07-01 12:50:29
[Download RAW message or body]

If either userDiff or sysDiff is zero, both userLoad and sysLoad are set 
to zero. The attached patch fixes this.

Could someone commit please?

-- 
Daniel Karlsson <chaotica@home.se>

["kdebase-ksysguard.patch" (text/x-diff)]

Index: ksysguard/ksysguardd/Linux/ProcessList.c
===================================================================
RCS file: /home/kde/kdebase/ksysguard/ksysguardd/Linux/ProcessList.c,v
retrieving revision 1.35
diff -u -3 -p -u -r1.35 ProcessList.c
--- ksysguard/ksysguardd/Linux/ProcessList.c	2001/06/04 14:45:05	1.35
+++ ksysguard/ksysguardd/Linux/ProcessList.c	2001/07/01 11:52:26
@@ -273,7 +273,7 @@ updateProcess(int pid)
 		userDiff = userTime - ps->userTime;
 		sysDiff = sysTime - ps->sysTime;
 
-		if ((timeDiff > 0) && (userDiff > 0) && (sysDiff > 0))
+		if ((timeDiff > 0) && (userDiff >= 0) && (sysDiff >= 0))
 		{
 			ps->userLoad = ((double) userDiff / timeDiff) * 100.0;
 			ps->sysLoad = ((double) sysDiff / timeDiff) * 100.0;

>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic