diff options
author | phk <phk@FreeBSD.org> | 2003-01-25 07:51:09 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-25 07:51:09 +0000 |
commit | bd84d01eeac47ef04237e8993ab6d653caa88493 (patch) | |
tree | 1e4ae714686c91cea287428d700d911f146100d4 /sys/kern/kern_tc.c | |
parent | c9f898d44f280ad672ca55624edcef1cc9758031 (diff) | |
download | FreeBSD-src-bd84d01eeac47ef04237e8993ab6d653caa88493.zip FreeBSD-src-bd84d01eeac47ef04237e8993ab6d653caa88493.tar.gz |
Add sysctl kern.timecounter.nsetclock which indicates the number of
potential discontinuities in our UTC timescale.
Applications can monitor this variable if they want to be informed
about steps in the timescale. Slews (ntp and adjtime(2)) and
frequency adjustments (ntp) will not increment this counter, only
operations which set the clock. No attempt is made to classify
size or direction of the step.
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index bb20a9e..93b50a0 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -96,6 +96,7 @@ TC_STATS(nbinuptime); TC_STATS(nnanouptime); TC_STATS(nmicrouptime); TC_STATS(nbintime); TC_STATS(nnanotime); TC_STATS(nmicrotime); TC_STATS(ngetbinuptime); TC_STATS(ngetnanouptime); TC_STATS(ngetmicrouptime); TC_STATS(ngetbintime); TC_STATS(ngetnanotime); TC_STATS(ngetmicrotime); +TC_STATS(nsetclock); #undef TC_STATS @@ -314,6 +315,7 @@ tc_setclock(struct timespec *ts) { struct timespec ts2; + nsetclock++; nanouptime(&ts2); boottime.tv_sec = ts->tv_sec - ts2.tv_sec; /* XXX boottime should probably be a timespec. */ |