diff options
author | des <des@FreeBSD.org> | 2003-04-24 12:12:06 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-04-24 12:12:06 +0000 |
commit | 4e35cc90419326826230e0b5296f9fadb74ed6ff (patch) | |
tree | be4d026598678166391dc752d66bc29817b013bc /sys | |
parent | bf8bb3cbd95cc59b6efd111d53375c475dcb9ca4 (diff) | |
download | FreeBSD-src-4e35cc90419326826230e0b5296f9fadb74ed6ff.zip FreeBSD-src-4e35cc90419326826230e0b5296f9fadb74ed6ff.tar.gz |
It seems that 1 was not a magic value as I thought, but a coincidence.
Instead of applying the adjustment to processes with a start time of 1,
apply it to all processes with a start time of less than 3600.
None of this would be necessary if the start times were recorded in ticks
instead of seconds and microseconds.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 7879a9a..dd7863b 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -679,8 +679,8 @@ fill_kinfo_proc(p, kp) } if ((p->p_sflag & PS_INMEM) && p->p_stats) { kp->ki_start = p->p_stats->p_start; - if (kp->ki_start.tv_sec == 1) - kp->ki_start = boottime; + if (kp->ki_start.tv_sec < 3600) + kp->ki_start.tv_sec += boottime.tv_sec; kp->ki_rusage = p->p_stats->p_ru; kp->ki_childtime.tv_sec = p->p_stats->p_cru.ru_utime.tv_sec + p->p_stats->p_cru.ru_stime.tv_sec; |