diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-01-25 07:51:09 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-01-25 07:51:09 +0000 |
commit | 4394f4767dbc3cf49b4dababb4bfafbbd588edf4 (patch) | |
tree | 1e4ae714686c91cea287428d700d911f146100d4 /sys/kern | |
parent | ed92abc56b1fda5fb8b5d640194cd39a8fdb986a (diff) |
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.
Notes
Notes:
svn path=/head/; revision=109813
Diffstat (limited to 'sys/kern')
-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 bb20a9ee3f5a..93b50a028298 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. */ |