summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-11-01 18:52:20 +0000
committerphk <phk@FreeBSD.org>2002-11-01 18:52:20 +0000
commit3ce3aae31e0179d6c2fec1801690b152f9187cf6 (patch)
tree94b50e5c2814a22c7aa96c5372ab96304f83867a /sys/kern/kern_tc.c
parente7002ff1e59fa4710ff3673baac09673ea1a2eb0 (diff)
downloadFreeBSD-src-3ce3aae31e0179d6c2fec1801690b152f9187cf6.zip
FreeBSD-src-3ce3aae31e0179d6c2fec1801690b152f9187cf6.tar.gz
Introduce a "time_uptime" global variable which holds the time since boot
in seconds.
Diffstat (limited to 'sys/kern/kern_tc.c')
-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 445eab8..be75a55 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;
}
OpenPOWER on IntegriCloud