diff options
Diffstat (limited to 'sysutils/gnome-system-monitor/files/patch-src::proctable.c')
-rw-r--r-- | sysutils/gnome-system-monitor/files/patch-src::proctable.c | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/sysutils/gnome-system-monitor/files/patch-src::proctable.c b/sysutils/gnome-system-monitor/files/patch-src::proctable.c index 30ef6303d397..49a699641476 100644 --- a/sysutils/gnome-system-monitor/files/patch-src::proctable.c +++ b/sysutils/gnome-system-monitor/files/patch-src::proctable.c @@ -1,28 +1,7 @@ ---- src/proctable.c.orig Sun Nov 21 18:03:12 2004 -+++ src/proctable.c Mon Dec 6 22:10:55 2004 -@@ -535,6 +535,9 @@ - glibtop_get_proc_uid (&procuid, pid); - glibtop_get_proc_time (&proctime, pid); - newcputime = proctime.utime + proctime.stime; -+ if (proctime.frequency) { -+ newcputime /= (proctime.frequency/100); -+ } - model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree)); +--- src/proctable.c.orig Tue Nov 30 01:28:31 2004 ++++ src/proctable.c Wed Dec 1 13:25:55 2004 +@@ -772,6 +772,12 @@ - wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()), -@@ -645,6 +648,10 @@ - glibtop_get_proc_uid (&procuid, pid); - glibtop_get_proc_time (&proctime, pid); - newcputime = proctime.utime + proctime.stime; -+ if (proctime.frequency) { -+ newcputime /= (proctime.frequency/100); -+ } -+ - - wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()), - pid, -@@ -745,6 +752,12 @@ - } +static int @@ -32,18 +11,15 @@ +} + static void - refresh_list (ProcData *data, const unsigned *pid_list, guint n) + refresh_list (ProcData *procdata, const unsigned *pid_list, const guint n) { -@@ -754,6 +767,8 @@ - GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree)); - guint i; +@@ -863,10 +869,15 @@ + + pid_list = glibtop_get_proclist (&proclist, which, arg); -+ qsort (pid_list, n, sizeof (*pid_list), pid_compare); ++ qsort(pid_list, proclist.number, sizeof (*pid_list), pid_compare); + - /* Add or update processes */ - for(i = 0; i < n; ++i) { - ProcInfo *info; -@@ -837,6 +852,9 @@ + /* FIXME: total cpu time elapsed should be calculated on an individual basis here ** should probably have a total_time_last gint in the ProcInfo structure */ glibtop_get_cpu (&cpu); total_time = cpu.total - total_time_last; |