diff options
author | des <des@FreeBSD.org> | 2003-05-01 16:59:23 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-05-01 16:59:23 +0000 |
commit | 8ed712ead15fc26b5070dcac9458f31fc6ecf0fa (patch) | |
tree | d8221c44ce99320f82809d2b7504a757957a47c4 /sys/kern/init_main.c | |
parent | eaf3fff90a28f606675fd3c1610d0def28d6be67 (diff) | |
download | FreeBSD-src-8ed712ead15fc26b5070dcac9458f31fc6ecf0fa.zip FreeBSD-src-8ed712ead15fc26b5070dcac9458f31fc6ecf0fa.tar.gz |
Instead of recording the Unix time in a process when it starts, record the
uptime. Where necessary, convert it back to Unix time by adding boottime
to it. This fixes a potential problem in the accounting code, which would
compute the elapsed time incorrectly if the Unix time was stepped during
the lifetime of the process.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index d0cfa52..83fca78 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -467,7 +467,7 @@ proc0_post(void *dummy __unused) */ sx_slock(&allproc_lock); LIST_FOREACH(p, &allproc, p_list) { - microtime(&p->p_stats->p_start); + microuptime(&p->p_stats->p_start); p->p_runtime.sec = 0; p->p_runtime.frac = 0; } |