netstar pushed a commit to branch master.

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

commit 7293df18b057ac0cfd4164eff2f02eeb76c11ab1
Author: Alastair Poole <nets...@gmail.com>
Date:   Thu Aug 13 13:36:51 2020 +0100

    proc: Document reason behind weird division.
    
    Maybe need to relook at this at a later date...for now it's okay
---
 src/bin/system/process.c | 1 +
 src/bin/system/process.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/system/process.c b/src/bin/system/process.c
index de7a570..b0f7009 100644
--- a/src/bin/system/process.c
+++ b/src/bin/system/process.c
@@ -877,6 +877,7 @@ _proc_thread_info(struct kinfo_proc *kp, Eina_Bool 
is_thread)
 
    p->cpu_time = (usage->ru_utime.tv_sec * 1000000) + usage->ru_utime.tv_usec +
        (usage->ru_stime.tv_sec * 1000000) + usage->ru_stime.tv_usec;
+   // XXX: See kern.sched.idlespins
    p->cpu_time /= 10000;
    p->state = _process_state_name(kp->ki_stat);
    p->mem_virt = kp->ki_size;
diff --git a/src/bin/system/process.h b/src/bin/system/process.h
index fc334ff..f61c69d 100644
--- a/src/bin/system/process.h
+++ b/src/bin/system/process.h
@@ -33,7 +33,7 @@ typedef struct _Proc_Info
    int8_t      priority;
    int         cpu_id;
    int32_t     numthreads;
-   long        cpu_time;
+   int64_t     cpu_time;
    double      cpu_usage;
 
    uint64_t    mem_size;

-- 


Reply via email to