Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_clock.c
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/clock.h> | #include <sys/clock.h> | ||||
#include <sys/limits.h> | #include <sys/limits.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/timetc.h> | #include <sys/timetc.h> | ||||
int tz_minuteswest; | |||||
int tz_dsttime; | |||||
/* | /* | ||||
* The adjkerntz and wall_cmos_clock sysctls are in the "machdep" sysctl | * The adjkerntz and wall_cmos_clock sysctls are in the "machdep" sysctl | ||||
* namespace because they were misplaced there originally. | * namespace because they were misplaced there originally. | ||||
*/ | */ | ||||
static int adjkerntz; | static int adjkerntz; | ||||
static int | static int | ||||
sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) | sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 315 Lines • ▼ Show 20 Lines | clock_print_ts(const struct timespec *ts, int nsdigits) | ||||
clock_ts_to_ct(ts, &ct); | clock_ts_to_ct(ts, &ct); | ||||
clock_print_ct(&ct, nsdigits); | clock_print_ct(&ct, nsdigits); | ||||
} | } | ||||
int | int | ||||
utc_offset(void) | utc_offset(void) | ||||
{ | { | ||||
return (tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0)); | return (wall_cmos_clock ? adjkerntz : 0); | ||||
} | } |