aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-11-01 18:52:20 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-11-01 18:52:20 +0000
commit38b0884cc3a5e455390230a1f05519d91a977966 (patch)
tree94b50e5c2814a22c7aa96c5372ab96304f83867a /sys/kern
parent0514d630495a7d36d9e4db5997a58ee5db12489f (diff)
Introduce a "time_uptime" global variable which holds the time since boot
in seconds.
Notes
Notes: svn path=/head/; revision=106304
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_tc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 445eab859fca..be75a556a341 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -78,6 +78,7 @@ struct timecounter *timecounter = &dummy_timecounter;
static struct timecounter *timecounters = &dummy_timecounter;
time_t time_second = 1;
+time_t time_uptime = 0;
static struct bintime boottimebin;
struct timeval boottime;
@@ -435,6 +436,7 @@ tc_windup(void)
/* Go live with the new struct timehands. */
time_second = th->th_microtime.tv_sec;
+ time_uptime = th->th_offset.sec;
timehands = th;
}