mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Introduce a "time_uptime" global variable which holds the time since boot
in seconds.
This commit is contained in:
parent
0514d63049
commit
38b0884cc3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106304
@ -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;
|
||||
}
|
||||
|
||||
|
@ -259,6 +259,7 @@ struct clockinfo {
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern time_t time_second;
|
||||
extern time_t time_uptime;
|
||||
|
||||
/*
|
||||
* Functions for looking at our clock: [get]{bin,nano,micro}[up]time()
|
||||
|
Loading…
Reference in New Issue
Block a user