Skip to content

Commit

Permalink
process->cputime should be millisecons now
Browse files Browse the repository at this point in the history
  • Loading branch information
urdh committed Jul 2, 2012
1 parent ffb330f commit c52cbe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process_iterator_apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int pti2proc(struct proc_taskallinfo *ti, struct process *process) {
process->pid = ti->pbsd.pbi_pid;
process->ppid = ti->pbsd.pbi_ppid;
process->starttime = ti->pbsd.pbi_start_tvsec;
process->cputime = ti->ptinfo.pti_total_user + ti->ptinfo.pti_total_system;
process->cputime = (ti->ptinfo.pti_total_user + ti->ptinfo.pti_total_system) / 1000;
bytes = strlen(ti->pbsd.pbi_comm);
memcpy(process->command, ti->pbsd.pbi_comm, (bytes < PATH_MAX ? bytes : PATH_MAX) + 1);
return 0;
Expand Down

0 comments on commit c52cbe6

Please sign in to comment.