diff options
author | lstewart <lstewart@FreeBSD.org> | 2011-12-24 01:32:01 +0000 |
---|---|---|
committer | lstewart <lstewart@FreeBSD.org> | 2011-12-24 01:32:01 +0000 |
commit | 1c0bb02c84b89eb2f680e27b37e58dd05abc23c1 (patch) | |
tree | f6c0eaf45fcae96aeeac68d7acbad79ae3dd9c58 /sys/kern/kern_ntptime.c | |
parent | 2425a92fa5a7e0049961b21fb111a4dabe00d257 (diff) | |
download | FreeBSD-src-1c0bb02c84b89eb2f680e27b37e58dd05abc23c1.zip FreeBSD-src-1c0bb02c84b89eb2f680e27b37e58dd05abc23c1.tar.gz |
Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The
sysclock_getsnapshot() function allows the caller to obtain a snapshot of all
the system clock and timecounter state required to create time stamps at a later
point. The sysclock_snap2bintime() function converts a previously obtained
snapshot into a bintime time stamp according to the specified flags e.g. which
system clock, uptime vs absolute time, etc.
These KPIs enable useful functionality, including direct comparison of the
feedback and feed-forward system clocks and generation of multiple time stamps
with different formats from a single timecounter read.
Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.
For more information, see http://www.synclab.org/radclock/
In collaboration with: Julien Ridoux (jridoux at unimelb edu au)
Diffstat (limited to 'sys/kern/kern_ntptime.c')
-rw-r--r-- | sys/kern/kern_ntptime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index 2669a54..7da7de2 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -148,13 +148,13 @@ typedef int64_t l_fp; #define SHIFT_FLL 2 /* FLL loop gain (shift) */ static int time_state = TIME_OK; /* clock state */ -static int time_status = STA_UNSYNC; /* clock status bits */ +int time_status = STA_UNSYNC; /* clock status bits */ static long time_tai; /* TAI offset (s) */ static long time_monitor; /* last time offset scaled (ns) */ static long time_constant; /* poll interval (shift) (s) */ static long time_precision = 1; /* clock precision (ns) */ static long time_maxerror = MAXPHASE / 1000; /* maximum error (us) */ -static long time_esterror = MAXPHASE / 1000; /* estimated error (us) */ +long time_esterror = MAXPHASE / 1000; /* estimated error (us) */ static long time_reftime; /* time at last adjustment (s) */ static l_fp time_offset; /* time offset (ns) */ static l_fp time_freq; /* frequency offset (ns/s) */ |