64-bit time for Linux 2.5.xx

This commit is contained in:
albert
2002-05-28 04:18:55 +00:00
parent ea1d89ec4f
commit bce2da1f9a
8 changed files with 93 additions and 100 deletions

View File

@@ -191,7 +191,7 @@ static void fill_pcpu(proc_t *buf){
total_time = buf->utime + buf->stime;
if(include_dead_children) total_time += (buf->cutime + buf->cstime);
seconds = (seconds_since_boot - ((unsigned long)buf->start_time) / Hertz);
seconds = seconds_since_boot - buf->start_time / Hertz;
if(seconds) pcpu = (total_time * 1000ULL / Hertz) / seconds;
buf->pcpu = (pcpu > 999) ? 999 : pcpu;
}