proc: Document reason behind weird division.

Maybe need to relook at this at a later date...for now it's okay
This commit is contained in:
Alastair Poole 2020-08-13 13:36:51 +01:00
parent e96a614c15
commit 7293df18b0
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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;