netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=be17d6ee1028a5b3d54d267c35f34bf0cf54527f

commit be17d6ee1028a5b3d54d267c35f34bf0cf54527f
Author: Alastair Poole <[email protected]>
Date:   Fri Jun 26 21:57:38 2020 +0100

    cpu: LoC
---
 src/bin/ui/ui_cpu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_cpu.c b/src/bin/ui/ui_cpu.c
index 433d6d4..0e4af97 100644
--- a/src/bin/ui/ui_cpu.c
+++ b/src/bin/ui/ui_cpu.c
@@ -157,19 +157,20 @@ _core_times_cb(void *data, Ecore_Thread *thread)
    cpu_core_t **cores;
    Eina_List *l;
    Ui *ui;
-   int ncpu, i;
+   int ncpu;
 
    ui = data;
 
-   while (!ecore_thread_check(thread))
+   for (int i = 0; !ecore_thread_check(thread); i = 0)
      {
         if (!ui->cpu_visible)
           {
              usleep(1000000);
              continue;
           }
-        i = 0;
+
         cores = system_cpu_usage_get(&ncpu);
+
         EINA_LIST_FOREACH(ui->cpu_list, l, progress)
           {
              *progress->value = cores[i]->percent;

-- 


Reply via email to